Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-09-2022 09:51 AM - edited 08-09-2022 09:52 AM
Hi Neo4j Community,
I'm interested in using link prediction in GDS to power real-time product recommendations. Can link prediction in GDS be used for real-time recommendations? Or is executing it too slow? What kind of computational complexity is link prediction?
Thanks
08-15-2022 08:19 AM - edited 08-15-2022 08:28 AM
Hi @JackGold,
The link prediction API as it currently stands is not really designed for real-time inferences. Every time you call `gds.beta.pipeline.linkPrediction.predict.*` it does predictions of new possible neighbors for all nodes in the graph. Further, it runs the computation of all node property steps that was also used when training the pipelines (like node embedding algorithms if you're using that) on the entire input graph.
The complexity will depend on the node property steps, the machine learning method you use in your pipeline, and which search strategy you use for predictions (approximate or exhaustive).
If what you want to do in real-time is in fact to run predictions for all nodes in the graph, then the current API will probably do you quite well with the caveat that node property steps may be expensive to compute as I mentioned.
In general we are interested in improving this aspect of our API, mainly in two particular ways:
With these two improvements the LP pipeline API could work quite well for real-time node specific recommendations.
Would you be interested in such features?
Another concern is that if you want make predictions on nodes that are incrementally added to your database, you may need to make a new projection into GDS that includes them, since the GDS in-memory graph does not support you adding new nodes to it. But not sure what your use-case is
All the sessions of the conference are now available online