8.2.2 最小限のGraphWiseモデルの作成

次のコードに示すように、最小限の構成とデフォルトのハイパーパラメータを使用するGraphWiseモデルを作成できます。

ノート:

Graph Server and Clientリリース21.2以降、次のいずれかのオプションを使用してモデルを作成できます。
  • 頂点プロパティのみ
  • エッジ・プロパティのみ
  • 頂点とエッジの両方のプロパティ
JShellを使用した頂点およびエッジ・プロパティによる最小限のGraphWiseモデルの作成

opg4j> var model = analyst.supervisedGraphWiseModelBuilder().
                setVertexInputPropertyNames("features").
                setVertexTargetPropertyName("label").
                setEdgeInputPropertyNames("cost").  //sets the edge properties name
                build();
Javaを使用した頂点およびエッジ・プロパティ・モデルによる最小限のGraphWiseの作成
SupervisedGraphWiseModel model = analyst.supervisedGraphWiseModelBuilder()
    .setVertexInputPropertyNames("features")
    .setVertexTargetPropertyName("labels")
    .setEdgeInputPropertyNames("cost")  //sets the edge properties name
    .build();
Pythonを使用した頂点プロパティ・モデルによる最小限のGraphWiseの作成
params = dict(vertex_target_property_name="label",
              vertex_input_property_names=["features"])

model = analyst.supervised_graphwise_builder(**params)

ノート:

前の例で1つの頂点プロパティと1つのエッジ・プロパティのみが指定されている場合でも、頂点またはエッジ・プロパティのリストを指定できます。