8.4.8 グラフレット・ベクトルの推測
次のコードに示すように、特定の新しいグラフレットのベクトル表現を推測できます。
JShellを使用したグラフレット・ベクトルの推測
opg4j> var graphlet = session.readGraphWithProperties("<path>/<graphletConfig.json>");
opg4j> inferredVector = model.inferGraphletVector(graphlet);
opg4j> inferredVector.print();
Javaを使用したグラフレット・ベクトルの推測
PgxGraph graphlet = session.readGraphWithProperties("<path>/<graphletConfig.json>");
PgxFrame inferredVector = model.inferGraphletVector(graphlet);
inferredVector.print();
Pythonを使用したグラフレット・ベクトルの推測
PgxGraph graphlet = session.read_graph_with_properties("<path>/<graphletConfig.json>")
inferredVector = model.infer_graphlet_vector(graphlet)
inferredVector.print()
inferredVector
のスキーマは、次の出力のようになります。
+---------------------------------------------------------------+
| graphlet | embedding |
+---------------------------------------------------------------+
親トピック: Pg2vecアルゴリズムの使用