Package mindsdb.models
Class Model
java.lang.Object
mindsdb.models.Model
- Direct Known Subclasses:
ModelVersion
Model class for handling model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiontech.tablesaw.api.Table
describe()
Return description of the modeltech.tablesaw.api.Table
Return description of the modelvoid
dropVersion
(int num) Drop version of the modelCall finetune of the modelGet identifier of the modelGet status of the modelgetVersion
(Integer num) Get version of the modelList all versions of the modeltech.tablesaw.api.Table
Make prediction with the modeltech.tablesaw.api.Table
Make prediction with the modeltech.tablesaw.api.Table
predict
(tech.tablesaw.api.Table data) Make prediction with the modeltech.tablesaw.api.Table
Make prediction with the modelCall retrain of the modelvoid
setActive
(int version) Set active version of the modeltoString()
void
Wait for training to complete
-
Constructor Details
-
Model
Constructor for Model- Parameters:
project
- Project objectdata
- Data for the model
-
-
Method Details
-
getIdentifier
Get identifier of the model- Returns:
- identifier of the model
-
toString
-
predict
Make prediction with the model- Parameters:
data
- input dataparams
- prediction parameters- Returns:
- prediction result in Tablesaw Table
-
predict
public tech.tablesaw.api.Table predict(tech.tablesaw.api.Table data) Make prediction with the model- Parameters:
data
- input data- Returns:
- prediction result in Tablesaw Table
-
predict
Make prediction with the model- Parameters:
data
- input dataparams
- prediction parameters- Returns:
- prediction result in Tablesaw Table
-
predict
Make prediction with the model- Parameters:
data
- input data- Returns:
- prediction result in Tablesaw Table
-
waitComplete
Wait for training to complete- Throws:
InterruptedException
- if the thread is interrupted
-
getStatus
Get status of the model- Returns:
- status of the model
-
describe
Return description of the model- Parameters:
type
- describe type (for lightwood is models, ensemble, features), optional- Returns:
- dataframe with result of description
-
describe
public tech.tablesaw.api.Table describe()Return description of the model- Returns:
- dataframe with result of description
-
listVersions
List all versions of the model- Returns:
- list of ModelVersion objects
-
getVersion
Get version of the model- Parameters:
num
- version number- Returns:
- ModelVersion object
-
dropVersion
public void dropVersion(int num) Drop version of the model- Parameters:
num
- version number
-
setActive
public void setActive(int version) Set active version of the model- Parameters:
version
- version number
-
retrain
Call retrain of the model- Parameters:
query
- SQL string to get data for retraining, optionaldatabase
- Database to get data for retraining, optionaloptions
- Parameters for retraining model, optionalengine
- ML engine, optional- Returns:
- Model object
-
finetune
Call finetune of the model- Parameters:
query
- SQL string to get data for fine-tuning, optionaldatabase
- Database to get data for fine-tuning, optionaloptions
- Parameters for fine-tuning model, optionalengine
- ML engine, optional- Returns:
- Model object
-