cancel
Showing results for 
Search instead for 
Did you mean: 

Predicting missing node properties

nils_hahn
Node Link

Hello everyone,

I am looking for a way, to predict a numerical property of a node.

My Neo4j contains a supply chain network, I am looking for a way to add missing properties to product nodes, especially a price. The price should be predicted from the context. For example, through considering the price of the predecessors and successors or a different similar product in the same location...

I already extracted some of that information into a table and used traditional machine learning algorithms for the same task. The results were quite promising, now I want to improve on that by considering the complete graph context.

Some more information: My Neo4j contains no transactional data and it is not dynamical.

Thank you for every idea or suggestion in advance!

7 REPLIES 7

ameyasoft
Graph Maven
MATCH (c:Stage) where not exists (c.price). This will show all the Stage nodes with missing price property.
To add the missing property:
MATCH (c:Stage) where not exists (c.price)
set c.price = 11
return c

Thank you!
Unfortunately that only allows me to assign a constant, predecided value to the attributes.
What I want, is predicting a somewhat logical value from the context. If I need me to be more specific pleas ask!

Please let me know few more details so that I can provide suitable answer.

nils_hahn
Node Link

Okay, so basically what I have is a rather complex Neo4j displaying a logisitic network. In this, the nodes for product have as property a certain price. The property is missing in approximately 10% of all product nodes. I am looking for a Machine Learning Algorithm to predict the price for those Nodes where it is missing. Specifially an algorithm that leverages the context of the graph database to make its prediction.
For example a product with similar predecessors, followers, properties and so on, should have a similar price.
I hope that helped!

Would node similarity algorithm go in the right direction?

https://neo4j.com/docs/graph-data-science/current/algorithms/node-similarity/

You can use it to measure "context" similarity between your nodes.

If this is not sufficient to make a prediction, you can use similarity in a more classical ML regression algorithm, as a feature, together with the node properties.

nils_hahn
Node Link

Thank you that sounds like a great idea. I will try both!

fabisch_kamz
Node Clone

I get you . you can try this user defined algorithm by Lauren Shin https://towardsdatascience.com/graphs-and-ml-multiple-linear-regression-c6920a1f2e70. Basicall She users Logistic Linear regression to predict node properties basing on similar nodes inside neo4j.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.