Graph-Embeddding
Graph-Embeddding copied to clipboard
Reimplementation of Graph Embedding methods by Pytorch.
您好!感谢您的模型在我学习上的帮助! 但是我在运行代码中遇到了一个问题,其中my_GAE.py在pubmed数据集上进行clustering任务时会提示错误 TypeError: cannot unpack non-iterable int object Class Not equal, Error!!!! 可能是聚类里面输入的类别不对?pubmed数据集里面的label是从0开始编号的0,1,2,所以 kmeans = KMeans(n_clusters=max(np.int_(labels).flatten()))这行代码的分类类别就出现了错误。但是当我将这行代码简单粗暴改为 n_clusters=3 后,代码可以运行,但是效果很差,尤其是nmi: ACC_H2= 39.424354617842475 NMI_H2= 0.012092663388261319 PUR_H2= -0.07971882995447442 请问这个问题该怎么解决呢……困扰好多天了
When I run the code, I see the clustering training loss is large. Is it reasonable?
# line 260 in Data_Process.py 抽样的时候,如果存在duplicated and diagonal edges,因为 #step5, 6 去掉了coords中 duplicated and diagonal edges, 而idx没做处理,那么# line 258 coords 和 # line 260 idx就不再是一一对应的关系。不知道我理解的有没有问题? 最后,感谢大佬分享~
谢谢
### 首先感谢分享! 代码中: score = f1_score(Pred_Y, Y_test, average='weighted') 其中Pred_Y, Y_test是否反了,看f1_scroe中的函数定义如下: def f1_score( y_true, y_pred, *, labels=None, pos_label=1, average="binary", sample_weight=None, zero_division="warn", ): y_true : 1d array-like, or label indicator array /...