17.6.4 パーティション・グラフを使用したUnsupervised Anomaly Detection GraphWiseモデルの作成
プロバイダおよび機能が異なるパーティション化されたグラフを使用して、Unsupervised Anomaly Detection GraphWiseモデルを作成できます。
               
               
               opg4j> var model = analyst.unsupervisedAnomalyDetectionGraphWiseModelBuilder().
         setVertexInputPropertyNames("vertex_provider1_features", "vertex_provider2_features").
         build()UnsupervisedAnomalyDetectionGraphWiseModel model = analyst.unsupervisedAnomalyDetectionGraphWiseModelBuilder()
    .setVertexInputPropertyNames("vertex_provider1_features", "vertex_provider2_features")
    .build();params = dict(vertex_input_property_names=["vertex_provider1_features", "vertex_provider2_features"])
model = analyst.unsupervised_anomaly_detection_graphwise_builder(**params)トレーニングまたは推測の対象とするプロバイダを選択できます:
opg4j> var model = analyst.unsupervisedAnomalyDetectionGraphWiseModelBuilder().
         setVertexInputPropertyNames("vertex_provider1_features", "vertex_provider2_features").
         build()UnsupervisedAnomalyDetectionGraphWiseModel model = analyst.unsupervisedAnomalyDetectionGraphWiseModelBuilder()
    .setVertexInputPropertyNames("vertex_provider1_features", "vertex_provider2_features")
    .build();params = dict(vertex_input_property_names=["vertex_provider1_features", "vertex_provider2_features"])
model = analyst.unsupervised_anomaly_detection_graphwise_builder(**params)各レイヤーで埋込みのフローを制御する場合は、対象となる接続を有効または無効にできます。デフォルトでは、すべての接続が有効です。
opg4j> var convLayerConfig = analyst.graphWiseConvLayerConfigBuilder().
         setNumSampledNeighbors(25).
         useVertexToVertexConnection(true).
         useEdgeToVertexConnection(true).
         useEdgeToEdgeConnection(false).
         useVertexToEdgeConnection(false).
         build()
opg4j> var model = analyst.unsupervisedAnomalyDetectionGraphWiseModelBuilder().
         setVertexInputPropertyNames("vertex_provider1_features", "vertex_provider2_features").
         build()GraphWiseConvLayerConfig convLayerConfig = analyst.graphWiseConvLayerConfigBuilder()
    .setNumSampledNeighbors(10)
    .useVertexToVertexConnection(true)
    .useEdgeToVertexConnection(true)
    .useEdgeToEdgeConnection(false)
    .useVertexToEdgeConnection(false)
    .build();
UnsupervisedAnomalyDetectionGraphWiseModel model = analyst.unsupervisedAnomalyDetectionGraphWiseModelBuilder()
    .setVertexInputPropertyNames("vertex_provider1_features", "vertex_provider2_features")
    .setConvLayerConfigs(convLayerConfig)
    .build();conv_layer_config = dict(num_sampled_neighbors=25,
                         activation_fn='tanh',
                         weight_init_scheme='xavier',
                         neighbor_weight_property_name=weightProperty,
                         vertex_to_vertex_connection=True,
                         edge_to_vertex_connection=True,
                         vertex_to_edge_connection=False,
                         edge_to_edge_connection=False)
conv_layer = analyst.graphwise_conv_layer_config(**conv_layer_config)
params = dict(vertex_input_property_names=["vertex_provider1_features", "vertex_provider2_features"],
              conv_layer_config=[conv_layer])
model = analyst.unsupervised_anomaly_detection_graphwise_builder(**params)