Git Product home page Git Product logo

Comments (3)

tkipf avatar tkipf commented on August 25, 2024 3

I recommend using the data loader from https://github.com/tkipf/keras-gcn/blob/master/kegra/utils.py

Then you don’t have to deal with this strange .allx etc format (which is just supplied in this repo because it was used in a benchmark from an earlier paper from some other lab on which we base our evaluation on) :)

from gae.

ZJJTSL avatar ZJJTSL commented on August 25, 2024

i have the same question about how to apply it to my own dataset, so if you have solved this problem , could you give me some guidance please, thanks a lot !

from gae.

ZJJTSL avatar ZJJTSL commented on August 25, 2024

Dear @tkipf
first of all, thank you for the excellent work! Your paper and the provided code are helpful to get started with GCN.

I'm currently trying to apply your algorithm to my data.
After looking at the load_data() function, I was able to create an adjacency matrix in the same format as your Cora example.

However, I struggle with the node feature object, because I don't understand the meaning of the content cora.tx and cora.allx.
The shape is (2709x1433) (#41 nodes x #features), so apparently, there are 1433 node features.
The print is as follows

(0, 19) 1.0
(0, 81) 1.0
(0, 146) 1.0
(0, 315) 1.0
(0, 774) 1.0
(0, 877) 1.0
(0, 1194) 1.0
(0, 1247) 1.0
(0, 1274) 1.0
(1, 19) 1.0
(1, 88) 1.0
(1, 149) 1.0
(1, 212) 1.0
(1, 233) 1.0

How can we interpret the rows? I can't make sense of it.
This format is usually an edge list format, but as we have node features, how do the edges come into play?

I looked into your other repositories and issues around this topic and couldn't find anything which helps me understand the structure of the .tx and .allx files.

tkipf/gcn#36
tkipf/gcn#125
tkipf/gcn#114
tkipf/gcn#36
tkipf/gcn#22
#35

I'm planning to use node degree as recommended here tkipf/gcn#22 (and add more features later on)
My current attempt is to do

node_deg = dict(G.degree()).values()
features = sparse.csr_matrix(node_deg).T

As I don't understand the Cora output, I can't really assess if that is correct or not.

Could you provide more guidance and explanation for that?

That would be great :)
Thank you in advance,
Best,
Minh
hi ,have you ever tried the degree matrix as the feature matrix, if so ,the dimention of feature matrix is n*1, does it work in your case?

from gae.

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.