Giter Club home page Giter Club logo

Comments (8)

tvayer avatar tvayer commented on August 19, 2024

Hello, can I have more details : which dataset are you using ? How do you load the data ?

from pscn.

Wangzhen-kris avatar Wangzhen-kris commented on August 19, 2024

Thanks for your reply! And sorry for not replying in time!
I use my own data set, which includes the adjacency matrix of graph and the feature matrix of node. Then I use your code to process the data in a suitable format. But my data has the following drawbacks: not all nodes of a graph are connected to each other. For example, a graph has 30 nodes, 25 of which are connected to each other, but the remaining 5 nodes are not connected to the 25 nodes.So I wonder if the problem is related to this?

from pscn.

tvayer avatar tvayer commented on August 19, 2024

Ok, I don't think this is the problem for I already used for such graphs (ex protein/enzymes dataset), I further investigate and come back to you

from pscn.

tvayer avatar tvayer commented on August 19, 2024

I think I found the error : the dimension of the vector attributes of your graphs is not fixed, some are 100 dimensional others are not. For PSCN to work you must have the same dimension for all your attributes. I pushed a new version where an error is raised when this problem occurs, so if you get a BadAttriDimError then some of your attributes are not 100 dimensional.

Moreover you should also define a "dummy_value" that is also a 100 dimensional vector (in the original paper this is a trick when the receptive field size is higher than the size of some graph, maybe this is the case for you..). For example by setting the option dummy_value=np.repeat(0,100) in PSCN. I added an example with the BZR dataset in train_example.

Tell me if this fixed your error

from pscn.

Wangzhen-kris avatar Wangzhen-kris commented on August 19, 2024

Thank you for your help.
Sorry... I‘ve set self.dummy_value=[-1] * attr_dim in file pscn.py , but the problem remains.
And I added a list variable named result in def process_data_test(self,X,y=None):

..........
..............
.................
self.times_process_details['labeling_procedure'].append(np.sum(rfMaker.all_times['labeling_procedure']))
self.times_process_details['first_labeling_procedure'].append(np.sum(rfMaker.all_times['first_labeling_procedure']))
result = []
for x in forcnn:
     for y in x:
          for z in y:
                result.append(z)

The correct length of x, y, z should be 25, 3, 100. But sometimes the length value of x is 2.This is also the cause of the problem, but I don't know how to modify the code.

from pscn.

tvayer avatar tvayer commented on August 19, 2024

Hello

Did you check that all your node features are 100 dimensional ? Did you tried to run the code with the last version of yesterday, what error do you get ?

Also dummy_value should be set when instantiate PSCN not inside pscn.py (see example in notebook)

from pscn.

Wangzhen-kris avatar Wangzhen-kris commented on August 19, 2024

Yes, I'm sure all my node features are 100 dimensional. Then I will run your newly released code and come back to you.
Thank you very much!

from pscn.

Wangzhen-kris avatar Wangzhen-kris commented on August 19, 2024

You're right. I found my mistake through your latest code. I apologize for my behavior of drawing conclusions without running the code. And thank you again for your help!

from pscn.

Related Issues (11)

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.