FighterLYL / GraphNeuralNetwork

《深入浅出图神经网络:GNN原理解析》配套代码
1.7k stars 457 forks source link

第五章代码有错误 #54

Closed Ireliafans closed 3 years ago

Ireliafans commented 3 years ago

第五章的数据有2708个样本,但是训练集验证集 测试集 数据分布分别是140:500:1000,数据划分存在问题。 正确的数据集划分应该把 “train_index = np.arange(y.shape[0]) 数据集大小有问题 val_index = np.arange(y.shape[0], y.shape[0] + 500)” 修改为 “x_shape=1208 train_index = np.arange(x_shape) val_index = np.arange(x_shape, x_shape + 500)” 数据集分布变成了1208:500:1000 ,测试集效果能从0.805 提高到0.871

likuanppd commented 3 years ago

GCN里的划分就是140:500:1000,每个label取20个做训练集,不要想当然啊

Ireliafans commented 3 years ago

为什么训练集节点这么少啊,验证和测试的却这么多

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: oldppd @.> 发送时间: 2021年4月20日 21:50 收件人: FighterLYL/GraphNeuralNetwork @.> 抄送: Ireliafans @.>, Author @.> 主题: 回复:[FighterLYL/GraphNeuralNetwork] 第五章代码有错误 (#54)

GCN里的划分就是140:500:1000,每个label取20个做训练集,不要想当然啊

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

likuanppd commented 3 years ago

3个citation graph上用这个划分很早就有了,是每个label取20个作为训练集,cora是7类,所以就是140个作为训练集

r1ght0us commented 2 years ago

3个citation graph上用这个划分很早就有了,是每个label取20个作为训练集,cora是7类,所以就是140个作为训练集

您好我想问下这个分类有什么依据在吗

likuanppd commented 2 years ago

3个citation graph上用这个划分很早就有了,是每个label取20个作为训练集,cora是7类,所以就是140个作为训练集

您好我想问下这个分类有什么依据在吗

从Kipf的GCN [1]开始,Cora、Citeseer、Pubmed这老三样citation graph就一直用这个划分了,每个类别20个作为训练集

https://arxiv.org/pdf/1609.02907.pdf?fbclid=IwAR0BgJeoKHIAvPuSE9fJ0_IQOEu5l75yxyNo7PUC08RTOFlm_IIo5YmcnQM

[1] Thomas N. Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In International Conference on Learning Representations (ICLR).

r1ght0us commented 2 years ago

3个citation graph上用这个划分很早就有了,是每个label取20个作为训练集,cora是7类,所以就是140个作为训练集

您好我想问下这个分类有什么依据在吗

从Kipf的GCN [1]开始,Cora、Citeseer、Pubmed这老三样citation graph就一直用这个划分了,每个类别20个作为训练集

https://arxiv.org/pdf/1609.02907.pdf?fbclid=IwAR0BgJeoKHIAvPuSE9fJ0_IQOEu5l75yxyNo7PUC08RTOFlm_IIo5YmcnQM

[1] Thomas N. Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In International Conference on Learning Representations (ICLR).

太牛逼了,谢谢您!终于找到这是为啥了