17.7.8 Inferring a Graphlet Vector

You can infer the vector representation for a given new graphlet as described in the following code:

opg4j> var graphlet = session.readGraphByName("<graph>",GraphSource.PG_VIEW)
opg4j> var inferredVector = model.inferGraphletVector(graphlet)
opg4j> inferredVector.print()
PgxGraph graphlet = session.readGraphByName("<graph>",GraphSource.PG_VIEW);
PgxFrame inferredVector = model.inferGraphletVector(graphlet);
inferredVector.print();
graphlet = session.read_graph_by_name("<graph>", "pg_view")
inferred_vector = model.infer_graphlet_vector(graphlet)
inferred_vector.print()
The schema for the inferredVector will be similar to the following output:
+---------------------------------------------------------------+
| graphlet                                | embedding           |
+---------------------------------------------------------------+