8.3.7 Unsupervised GraphWiseモデルの格納

モデルはデータベースに格納できます。モデルは、モデル・ストア表内の行として格納されます。
  1. 次のコードに示すように、トレーニング済のUnsupervised GraphWiseモデルを格納します。
    JShellを使用したトレーニング済Unsupervised 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を使用したトレーニング済Unsupervised 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を使用したトレーニング済Unsupervised GraphWiseモデルの格納
    model.export().db(model_store="modelstoretablename",
                      model_name="model", description="a model description")

    ノート:

    前述のすべての例では、現在ログインしているデータベースにモデルを格納することを前提としています。別のデータベースにモデルを格納する必要がある場合は、トレーニング済モデルの別のデータベースへの格納の例を参照してください。