neo4j / graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
https://neo4j.com/docs/graph-data-science/current/
Other
596 stars 157 forks source link

FastRP algorithms gives zeros as embeddings #218

Closed meg261995 closed 1 year ago

meg261995 commented 1 year ago

Hi,

Can anyone explain me why FastRP gives zeros as embeddings for nodes?

FlorentinD commented 1 year ago

Do you have orphan nodes (nodes with 0 relationships)? We also have a description in our docs as our nodeSelfInfluence parameter is a way too avoid this (https://neo4j.com/docs/graph-data-science/current/machine-learning/node-embeddings/fastrp/#algorithms-embeddings-fastrp-node-self-influence).

meg261995 commented 1 year ago

Yes actually. The relationshipType I have mentioned in the configuration is null for all the nodes with zero embeddings

FlorentinD commented 1 year ago

Then I would suggest to try out the nodeSelfInfluence parameter. Hope this solves your problem!

meg261995 commented 1 year ago

Can u give an example please? It says I need to provide a float value. Suppose I give a value of 2.0 how would that affect the result?

FlorentinD commented 1 year ago

Similarly, nodeSelfInfluence behaves like an iteration weight for a 0 th iteration, or the amount of influence the projection of a node has on the embedding of the same node. So you would chose values similar to the other iteration weights.

Please read our docs (https://neo4j.com/docs/graph-data-science/current/machine-learning/node-embeddings/fastrp/#_iteration_weights)

meg261995 commented 1 year ago

Yes, Thanks alot