GithubHelp home page GithubHelp logo

A bug in aug_random_edge about graphcl HOT 10 CLOSED

shen-lab avatar shen-lab commented on August 27, 2024
A bug in aug_random_edge

from graphcl.

Comments (10)

yyou1996 avatar yyou1996 commented on August 27, 2024

Hi @skydetailme,

Thanks for your interest in our work. Would you mind pointing out which file you are referring to? I think in my implementation I did not use "remove()" function but directly use indexing to modify them, e.g.

edge_index = np.concatenate((edge_index[:, np.random.choice(edge_num, (edge_num - permute_num), replace=False)], idx_add), axis=1)

from graphcl.

skydetailme avatar skydetailme commented on August 27, 2024

Hi, thanks for the reply. Here is the link.
https://github.com/Shen-Lab/GraphCL/blob/master/unsupervised_Cora_Citeseer/aug.py

from graphcl.

yyou1996 avatar yyou1996 commented on August 27, 2024

@yongduosui, would you mind giving some comments on this? Thanks!

from graphcl.

yongduosui avatar yongduosui commented on August 27, 2024

@skydetailme The aim of this code is to convert to convert bidirectional edges index to unidirectional index. I just debug my code and did't find any bug. It remove the other edge index pair successfully. You can print the list and check. Thanks.

from graphcl.

skydetailme avatar skydetailme commented on August 27, 2024

@skydetailme The aim of this code is to convert to convert bidirectional edges index to unidirectional index. I just debug my code and did't find any bug. It remove the other edge index pair successfully. You can print the list and check. Thanks.

Would you mind take some minutes to read the link I posted, it explains well.
And you will find that after this iteration, index_list is not empty, those are the items accidentally jumped because of index error. Those items are not solved.
The result may right on some occasions but this code may not logically right.

from graphcl.

skydetailme avatar skydetailme commented on August 27, 2024

@skydetailme The aim of this code is to convert to convert bidirectional edges index to unidirectional index. I just debug my code and did't find any bug. It remove the other edge index pair successfully. You can print the list and check. Thanks.

Also, thanks for your help.

from graphcl.

skydetailme avatar skydetailme commented on August 27, 2024

@skydetailme The aim of this code is to convert to convert bidirectional edges index to unidirectional index. I just debug my code and did't find any bug. It remove the other edge index pair successfully. You can print the list and check. Thanks.

It seems that if the adj matrix is self-loop, this code may cause a wrong result, and the index_list is not empty.
If it's not a self-loop adj matrix, the result is right.

from graphcl.

yyou1996 avatar yyou1996 commented on August 27, 2024

@skydetailme Thank you for your carefulness, and I see your point. The citation net datasets happen to be without self-loop. I will read the post and give some comments after finishing my work at hand.

from graphcl.

skydetailme avatar skydetailme commented on August 27, 2024

@skydetailme Thank you for your carefulness, and I see your point. The citation net datasets happen to be without self-loop. I will read the post and give some comments after finishing my work at hand.

Thanks for your reply and contribution. This project helps a lot.

from graphcl.

yyou1996 avatar yyou1996 commented on August 27, 2024

Hi @skydetailme,

Sorry for the late reply that I just survive a DDL. I make certain modifications according to the blog u share https://thispointer.com/python-remove-elements-from-a-list-while-iterating/. Thanks again for your carefulness.

from graphcl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.