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

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

ノート:

Graph Server and Clientリリース21.2以降、次のいずれかのオプションを使用してモデルを作成できます。
  • 頂点プロパティのみ
  • エッジ・プロパティのみ
  • 頂点とエッジの両方のプロパティ
opg4j> var model = analyst.supervisedGraphWiseModelBuilder().
                setVertexInputPropertyNames("features").
                setVertexTargetPropertyName("label").
                setEdgeInputPropertyNames("cost").  
                build()
SupervisedGraphWiseModel model = analyst.supervisedGraphWiseModelBuilder()
    .setVertexInputPropertyNames("features")
    .setVertexTargetPropertyName("labels")
    .setEdgeInputPropertyNames("cost")  
    .build();
params = dict(vertex_target_property_name="label",
              edge_input_property_names=["cost"],
              vertex_input_property_names=["features"])

model = analyst.supervised_graphwise_builder(**params)

ノート:

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