8.3.7 Storing a Unsupervised GraphWise Model

You can store models in database. The models get stored as a row inside a model store table.
  1. Store a trained Unsupervised GraphWise Model as shown in following code:
    Storing a Trained Unsupervised GraphWise Model Using JShell
    
    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();
    Storing a Trained Unsupervised GraphWise Model Using Java
    
    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();
    Storing a Trained Unsupervised GraphWise Model Using Python
    model.export().db(model_store="modelstoretablename",
                      model_name="model", description="a model description")

    Note:

    All the preceding examples assume that you are storing the model in the current logged in database. If you must store the model in a different database then refer to the examples in Storing a Trained Model in Another Database.