Giter Club home page Giter Club logo

Comments (5)

RexYing avatar RexYing commented on August 20, 2024 3
  1. Networkx has a very easy-to-use interface for constructing graphs from data. You could certainly do it relatively fast. Also note that since networkx (naive python implementation in general) is not fast when dealing with large dataset, I would recommend converting data to re-indexed smaller adjacency matrices based on minibatches at training time. Let me know if it's needed and you need more explanation on that.

  2. Label is just for supervised learning. Features for nodes typically describe the entity that nodes in network represent. Eg. in PPI network, the features are characteristics of proteins; in social network, the features tell information about users. feat.npy saves these features (num_nodes x feature_dim) into the numpy format.

  3. Maybe Will has a bit more slides. For details related to the paper, I'd also recommend the graphsage-simple repo (https://github.com/williamleif/graphsage-simple), which re-writes the simplest variant of the algorithm in PyTorch, and is very easy to understand compared to this TF full version. Hope that would help!

Rex

from graphsage.

amitpande123 avatar amitpande123 commented on August 20, 2024

Rex thanks for the comments. Figured out the rest.

from graphsage.

binh-ml avatar binh-ml commented on August 20, 2024

Hi Rex Ying! I'm also a newbie in networkx and I'm facing the same problem as of @amitpande123 . Could you please explain in more detail this senctence: "I would recommend converting data to re-indexed smaller adjacency matrices based on minibatches at training time." I'm quite a bit confused about this. Thanks in advance!

from graphsage.

RexYing avatar RexYing commented on August 20, 2024

Sorry for the late response.
Suppose that (v1, v2, ... ) are your minibatch of nodes. You need to find all nodes in the neighborhood of each of (v1, v2, ...). Suppose that V' is the set of all nodes in these neighborhoods.
Now construct a subgraph G' of the original graph G, that contains only V' nodes and edges between them.
Obtain the adjacency matrix of the subgraph G'. You now re-index each node in V' according to the order in the new adjacency matrix.

Using the new index you build the feature matrix, for each row i, you fill in the features of the i-th node in G'.

Let me know if you have more questions.

from graphsage.

NidhiSultan avatar NidhiSultan commented on August 20, 2024

Hi @RexYing ,
I am trying to train graphsage on my dataset and I have created the graph using networkx, though there's a minibatch dataset requirement which has links just nodes as one of the dict with train_removed as one of the filed. This info is not present anywhere otherwise. Can you please help me understand how to create the dataset in the required format or share some insight into how can I do so by using Graphsage?
Any help would be appreciated!

Thanks
Nidhi

from graphsage.

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.