8.2.9 トレーニング済Supervised GraphWiseモデルの格納
モデルはデータベースに格納できます。モデルは、モデル・ストア表内の行として格納されます。
次のコードは、トレーニング済Supervised GraphWiseモデルを特定のモデル・ストア表のデータベースに格納する方法を示しています。
JShellを使用したトレーニング済Supervised GraphWiseモデルの格納
opg4j> model.export().db().
modelstore("modelstoretablename"). // name of the model store table
modelname("model"). // model name (primary key of model store table)
description("a model description"). // description to store alongside the model
store();
Javaを使用したトレーニング済Supervised GraphWiseモデルの格納
model.export().db()
.modelstore("modelstoretablename") // name of the model store table
.modelname("model") // model name (primary key of model store table)
.description("a model description") // description to store alongside the model
.store();
Pythonを使用したトレーニング済Supervised GraphWiseモデルの格納
model.export().db(model_store="modeltablename",
model_name="model", description="a model description")
ノート:
前述のすべての例では、現在ログインしているデータベースにモデルを格納することを前提としています。別のデータベースにモデルを格納する必要がある場合は、トレーニング済モデルの別のデータベースへの格納の例を参照してください。