Class Models

java.lang.Object
mindsdb.services.Models

public class Models extends Object
Models service class for handling models.
  • Constructor Details

    • Models

      public Models(Project project, RestAPI api)
      Constructor for Models
      Parameters:
      project - - Project object
      api - - RestAPI object
  • Method Details

    • listModels

      public List<Model> listModels(String name)
      List all models
      Parameters:
      name - - name of the model
      Returns:
      List of Model objects
    • listModelsWithVersion

      public List<ModelVersion> listModelsWithVersion(String name, Integer version)
      List all models with version
      Parameters:
      name - - name of the model
      version - - version of the model
      Returns:
      List of ModelVersion objects
    • getModel

      public Model getModel(String name)
      Get a specific model by name
      Parameters:
      name - - name of the model
      Returns:
      Model object
    • getModelWithVersion

      public ModelVersion getModelWithVersion(String name, Integer version)
      Get a specific model by name and version
      Parameters:
      name - - name of the model
      version - - version of the model
      Returns:
      ModelVersion object
    • create

      public Model create(String name, String predict, String engine, String query, String database, Map<String,Object> options, Map<String,Object> timeseriesOptions)
      Create a new model
      Parameters:
      name - - name of the model
      predict - - predict column
      engine - - engine name
      query - - query for the model
      database - - database name
      options - - options for the model
      timeseriesOptions - - timeseries options for the model
      Returns:
      Model object