GithubHelp home page GithubHelp logo

map the nodes to embeddings about verse HOT 8 OPEN

xgfs avatar xgfs commented on August 25, 2024
map the nodes to embeddings

from verse.

Comments (8)

xgfs avatar xgfs commented on August 25, 2024 1

Note that I still sort the nodes, so the order should be deterministic.

from verse.

hadisfr avatar hadisfr commented on August 25, 2024

convert script generates a node2id map to convert IDs to sequential integers which is used in BCSR. You can change the converter script to save this mapping somewhere.

node2id = dict(zip(sorted(map(int, nodes)), range(number_of_nodes)))

Note that because this mapping is generated based on a set of nodes, there is no guaranty on ordering of nodes, so the generated mapping may be vary each time you run the convert script.

from verse.

hadisfr avatar hadisfr commented on August 25, 2024

Note that I still sort the nodes, so the order should be deterministic.

Oh yes. I missed the sort part. 🤦🏻‍♂️

from verse.

linz2000 avatar linz2000 commented on August 25, 2024

Hi Author,
I also want to know how to map the node to its embedding, and I am confused about using the same train data but getting different results each time?

from verse.

xgfs avatar xgfs commented on August 25, 2024

What do you mean by results? By default, the embeddings are initalized randomly each time, so it's normal that you get different embedding each time you run the model.

from verse.

linz2000 avatar linz2000 commented on August 25, 2024

oh yes, I mean got different embeddings. Could I ask how to get the embedding of each node? Are these embedding results sorted in ascending order by node number?

from verse.

xgfs avatar xgfs commented on August 25, 2024

If you converted the graphs with the supplied converter, then the node IDs are sorted in the ascending order.

from verse.

linz2000 avatar linz2000 commented on August 25, 2024

I got it, thanks for your reply!

from verse.

Related Issues (17)

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.