Coder Social home page Coder Social logo

Comments (2)

ShichangZh avatar ShichangZh commented on June 12, 2024

Thank you for your question.

The reason why idx_test_ind and obs_idx_train can have the same element is because they correspond to two different indexing systems.

It is a bit complicated to create a proper inductive setting, though we try to make variable meanings clear in the function comments.

Indices start with 'obs_' correspond to the node indices within the observed subgraph,
where as indices start directly with 'idx_' correspond to the node indices in the original graph

In other words, ind_ covers [0, N], and obs_idx covers [0, N_{obs}], where the 0 in these two indexing systems corresponds to different nodes.

Let me explain it in more detail.

If you look at the following line in the run_inductive function, you will see that idx_obs is meant to index the original graph and construct the observed graph.

obs_g = g.subgraph(idx_obs)

This subgraph function will assign each node a new index. Later on, when creating a nodeloader in the following line, we pass obs_idx_train to the loader function to index the observed graph (subgraph).

obs_dataloader = dgl.dataloading.NodeDataLoader(

In other words, obs_idx_train corresponds to the new indices created by the subgraph function.

Sorry for the confusion. I hope this helps. Please let me know if you have other questions.

from graphless-neural-networks.

Leon-0602 avatar Leon-0602 commented on June 12, 2024

Thanks a lot for your clear explanations and patient help. I believe that GLNN and your future work will be very impactful. :)

from graphless-neural-networks.

Related Issues (10)

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.