8.4.9 Inferring Vectors for a Graphlet Batch
You can infer the vector representations for multiple graphlets (specified with different graph-ids in a graph) as described in the following code:
Inferring Vectors for a Graphlet Batch Using
JShell
opg4j> var graphlet = session.readGraphWithProperties("<path>/<graphletConfig.json>");
opg4j> inferredVectorBatched = model.inferGraphletVectorBatched(graphlets);
opg4j> inferredVectorBatched.print();
Inferring Vectors for a Graphlet Batch Using Java
PgxGraph graphlet = session.readGraphWithProperties("<path>/<graphletConfig.json>");
PgxFrame inferredVectorBatched = model.inferGraphletVectorBatched(graphlets);
inferredVector.print();
Inferring Vectors for a Graphlet Batch Using Python
graphlets = session.read_graph_with_properties("<path>/<graphletConfig.json>")
inferred_vector_batched = model.infer_graphlet_vector_batched(graphlets)
inferred_vector_batched.print()
The schema is same as for inferGraphletVector
but with more rows corresponding to the input graphlets.
Parent topic: Using the Pg2vec Algorithm