16.2.2 最小限のGraphWiseモデルの作成
次のコードに示すように、最小限の構成とデフォルトのハイパーパラメータを使用して、GraphWiseモデルを作成できます。次のいずれかのオプションを使用してモデルを作成できます。
- 頂点プロパティのみ
- エッジ・プロパティのみ
- 頂点とエッジの両方のプロパティ
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つのエッジ・プロパティのみが指定されている場合でも、頂点またはエッジ・プロパティのリストを指定できます。