Giter VIP home page Giter VIP logo

Comments (2)

XiHaKitty avatar XiHaKitty commented on August 18, 2024

Hello
The problem I urgently need to solve is exactly similar to your goal. I generated the embedding in another way. I need to solve the task of link prediction. Could you please solve it.
Any answer will be of great help to me.
Thank you

from gem.

claudiodtbarros avatar claudiodtbarros commented on August 18, 2024

I have solved issues regarding link prediction by changing the following files and the following lines:

  1. File /gem/utils/evaluation.util.py
    Line 40: for (st, ed, w) in di_graph.edges_iter(data='weight', default=1):

I have changed to for (st, ed, w) in list(di_graph.edges(data='weight', default=1)):
Reason: As far as I have understood, edges_iter was removed after NetworkX 2.0.

  1. File /gem/evaluation/evaluate_link_prediction.py
    Line 67: filtered_edge_list = [e for e in predicted_edge_list if not train_digraph.has_edge(node_l(e[0]), node_l(e[1]))]

I have changed to filtered_edge_list = [e for e in predicted_edge_list if not train_digraph.has_edge(node_l[e[0]], node_l[e[1]])]

Reason: If node_l is None (line 65), then node_l is defined as a list (line 66). Therefore, as lists being not callable, one must use node_l[...], and not node_l(...). I have not tested link prediction for labeled graphs yet.

Best regards!

from gem.

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.