17.3.2 Building a Minimal Supervised EdgeWise Model
You can build an EdgeWise
model using the minimal
configuration and default hyper-parameters as described in the following code. Note that
even though only one feature property is needed (either on vertices with
setVertexInputPropertyNames
or edges with
setEdgeInputPropertyNames
) for the model to work, you can specify as many
as required.
opg4j> var model = analyst.supervisedEdgeWiseModelBuilder().
setVertexInputPropertyNames("vertex_features").
setEdgeInputPropertyNames("edge_features").
setEdgeTargetPropertyName("label").
build()
SupervisedEdgeWiseModel model = analyst.supervisedEdgeWiseModelBuilder()
.setVertexInputPropertyNames("vertex_features")
.setEdgeInputPropertyNames("edge_features")
.setEdgeTargetPropertyName("labels")
.build();
params = dict(edge_target_property_name="label",
vertex_input_property_names=["vertex_features"],
edge_input_property_names=["edge_features"])
model = analyst.supervised_edgewise_builder(**params)