8.3.1 グラフのロード

次に、グラフをロードするステップについて説明します。
  1. セッションアナリストを作成します。
    JShellを使用したセッションおよびアナリストの作成
    
    cd /opt/oracle/graph/
    ./bin/opg4j
    // starting the shell will create an implicit session and analyst
    
    Javaを使用したセッションおよびアナリストの作成
    import oracle.pgx.api.*;
    import oracle.pgx.api.mllib.UnsupervisedGraphWiseModel;
    import oracle.pgx.api.frames.*;
    import oracle.pgx.config.mllib.ActivationFunction;
    import oracle.pgx.config.mllib.GraphWiseConvLayerConfig;
    import oracle.pgx.config.mllib.UnsupervisedGraphWiseModelConfig;
    import oracle.pgx.config.mllib.WeightInitScheme;
    
    PgxSession session = Pgx.createSession("my-session");
    Analyst analyst = session.createAnalyst();
    Pythonを使用したセッションおよびアナリストの作成
    session = pypgx.get_session()
    analyst = session.analyst
  2. グラフをロードします。
    JShellを使用したグラフのロード
    opg4j> var graph = session.readGraphWithProperties("<path/to/graph_config.json>");
    
    Javaを使用したグラフのロード
    PgxGraph graph = session.readGraphWithProperties("<path/to/graph_config.json>");
    
    Pythonを使用したグラフのロード
    graph = session.readGraphWithProperties("<path/to/graph_config.json>")

    モデルは教師なしでトレーニングされるため、テスト・グラフやテスト頂点を使用する必要はありません。