thunlp / OpenNE

An Open-Source Package for Network Embedding (NE)
MIT License
1.68k stars 485 forks source link

GCN output problem #34

Closed caijiangyao1991 closed 4 years ago

caijiangyao1991 commented 6 years ago

i cant't find the output vec_all.txt when running GCN, python src/main.py --method gcn --label-file data/cora/cora_labels.txt --input data/cora/cora_edgelist.txt --graph-format edgelist --feature-file data/cora/cora.features --epochs 200 --output vec_all.txt --clf-ratio 0.1

the precedure didnot have the model save or embedding save or how to predict the new data

zzy14 commented 6 years ago

In this package, the output file is for saving the node embeddings. Since GCN just has the convolution kernels, the output parameter is useless for GCN. I have updated README to clarify that.

Tomposon commented 6 years ago

But how can I get the node embedding with the GCN? @zzy14

Tomposon commented 6 years ago

Have you solved this problem:get the embeddings? @caijiangyao1991

caijiangyao1991 commented 6 years ago

@Tomposon i don't get the embeddings , i just get the prediction of new data

Tomposon commented 6 years ago

Do you mean that your task is to do the node classification?But I want to get the node embedding with the GCN.I think the GCN implemented here is an end-to-end algorithm,am I right?

caijiangyao1991 commented 6 years ago

@Tomposon yes you are right

Tomposon commented 6 years ago

Thank you! @caijiangyao1991

gopick commented 6 years ago

@zzy14 can you elaborate on why the output parameter is useless for GCN? How do we change this code to obtain the node embeddings from the GCN model?

gopick commented 6 years ago

@Tomposon @caijiangyao1991 Have you guys figured out a way to obtain the node embeddings from GCN?

Tomposon commented 6 years ago

No,I choose another algorithm GraphSAGE. @gopick

CynthiaWang2018 commented 5 years ago

@Tomposon Have you obtain the node embeddings with GraphSage?

Tomposon commented 5 years ago

@CynthiaWang2018 You can use the unsupervised version, you could see the information about embeddings saving in the source code.

CynthiaWang2018 commented 5 years ago

@Tomposon I have transform the original social network dataset into an ' .edgelist' document. (No feature ,No labels)Can I use the GraphSAGE algrithm or some other GCN methods get the representation of all nodes?

beyondguo commented 5 years ago

In this package, the output file is for saving the node embeddings. Since GCN just has the convolution kernels, the output parameter is useless for GCN. I have updated README to clarify that.

Why are you saying the output parameters of GCN are useless? The effective graph embedding is also one of the contributions of GCN.

beyondguo commented 5 years ago

No,I choose another algorithm GraphSAGE. @gopick

Hi, are you using the code from GraphSage's official github https://github.com/williamleif/GraphSAGE to get the node embedding? Thank you!

Bznkxs commented 4 years ago

Hi, Thanks for your discussion. Our new OpenNE-PyTorch update (https://github.com/thunlp/OpenNE/tree/pytorch) has solved this and you can find output in results/GCN after running

python -m openne --model gcn --dataset cora