15.5.1 グラフのロード
次に、グラフをロードするステップについて説明します。
- セッションとアナリストを作成します。
cd /opt/oracle/graph/ ./bin/opg4j // starting the shell will create an implicit session and analyst
import oracle.pgx.api.*; import oracle.pgx.api.mllib.Pg2vecModel; import oracle.pgx.api.frames.*; ... PgxSession session = Pgx.createSession("my-session"); Analyst analyst = session.createAnalyst();
session = pypgx.get_session(session_name="my-session") analyst = session.create_analyst()
- グラフをロードします。
opg4j> var graph = session.readGraphWithProperties("<path>/<graph.json>")
PgxGraph graph = session.readGraphWithProperties("<path>/<graph.json>");
graph = session.read_graph_with_properties("<path>/<graph.json>")
親トピック: Pg2vecアルゴリズムの使用