17.7.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:
opg4j> var graphlet = session.readGraphByName("<graph>", GraphSource.PG_VIEW)
opg4j> var inferredVectorBatched = model.inferGraphletVectorBatched(graphlets)
opg4j> inferredVectorBatched.print()
PgxGraph graphlet = session.readGraphByName("<graph>", GraphSource.PG_VIEW);
PgxFrame inferredVectorBatched = model.inferGraphletVectorBatched(graphlets);
inferredVector.print();
graphlets = session.read_graph_by_name("<graph>", "pg_view")
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