Gremlin inference queries in Neptune ML
As described in Neptune ML capabilities, Neptune ML supports training models that can do the following kinds of inference tasks:
Node classification – Predicts the categorical feature of a vertex property.
Node regression – Predicts a numerical property of a vertex.
Edge classification – Predicts the categorical feature of an edge property.
Edge regression – Predicts a numerical property of an edge.
Link prediction – Predicts destination nodes given a source node and outgoing edge, or source nodes given a destination node and incoming edge.
We can illustrate these different tasks with examples that use the MovieLens 100k dataset
Node classification: In the dataset above, Genre
is a vertex type which is connected to vertex type Movie by edge included_in.
However, if we tweak the dataset to make Genre a categoricalMovie, then the problem of inferring Genre
for new movies added to our knowledge graph can be solved using node classification
models.
Node regression: If we consider the vertex type Rating,
which has properties like timestamp and score, then the problem of inferring
the numerical value Score for a Rating can be solved using node regression models.
Edge classification: Similarly, for a Rated edge, if we
have a property Scale that can have one of the values, Love, Like,
Dislike, Neutral, Hate, then the problem of inferring Scale
for the Rated edge for new movies/ratings can be solved using edge classification models.
Edge regression: Similarly, for the same Rated edge,
if we have a property Score that holds a numerical value for the rating, then this can be
inferred from edge regression models.
Link prediction: Problems like, find the top ten users who are most likely to rate a given movie, or find the top ten Movies that a given user is most likely to rate, falls under link prediction.
Note
For Neptune ML use-cases, we have a very rich set of notebooks designed to give you a
hands-on understanding of each use-case. You can create these notebooks along with your Neptune
cluster when you use the Neptune ML AWS CloudFormation template
to create a Neptune ML cluster. These notebooks are also available on github