functionality enables you to create a machine learning model, rename the model, export the syntax for the model creation, retrain the model, execute a query against the model, and drop the model.Documentation Index
Fetch the complete documentation index at: https://docs.ocient.com/llms.txt
Use this file to discover all available pages before exploring further.
CREATE MLMODEL
Train a new machine learning model of type<model type> on the result set returned by the SQL SELECT statement. After the database creates the model, <model name> becomes a callable function in SQL SELECT statements.
Syntax
SQL
model_name
| Parameter | Data Type | Description |
|---|---|---|
model name | VARCHAR | The name of the model to create. |
model_type
| Parameter | Data Type | Description |
|---|---|---|
model type | VARCHAR | The type of machine learning model to create. |
SIMPLE LINEAR REGRESSIONMULTIPLE LINEAR REGRESSIONPOLYNOMIAL REGRESSIONLINEAR COMBINATION REGRESSIONVECTOR AUTOREGRESSIONKMEANSKNN (K Nearest Neighbors)LOGISTIC REGRESSIONNAIVE BAYESNONLINEAR REGRESSIONFEEDFORWARD NETWORKPRINCIPAL COMPONENT ANALYSISLINEAR DISCRIMINANT ANALYSISSUPPORT VECTOR MACHINEDECISION TREEGAUSSIAN MIXTURE MODELASSOCIATION RULESGRADIENT BOOSTED TREESREGRESSION TREEBAGGINGBOOSTINGSTACKING
option_list
| Parameter | Data Type | Description |
|---|---|---|
option_list | VARCHAR | The options for the specified machine learning model that is specified as a comma-separated list in the format: <option name 1> -> <value 1>, <option name 2> -> <value 2>, and so on. Names and values must be all enclosed in single quotes and are case sensitive with the exception that Boolean values can be true, false, TRUE, or FALSE. Refer to the respective model for the full options list. Example options list: options( 'yIntercept' -> '10', 'metrics' -> 'true') |
You cannot create a machine learning model with an existing schema and name combination.
mldata table that contains the data for the model. Then, you can create the my_model machine learning model based on that data.
SQL
ALTER MLMODEL RENAME
Rename a machine learning model. Use theIF EXISTS clause to ignore any models that do not exist.
Required Privileges
To rename a view, you must have the ALTER MLMODEL privilege for the model.
The System requires these privileges if this statement includes a change to the schema:
VIEWprivilege on the current schema of the modelVIEW MLMODELandCREATE MLMODELprivileges on the target schema (if the schema already exists)CREATE MLMODELprivilege on the database (if the schema does not exist)
SQL
| Parameter | Data Type | Description |
|---|---|---|
model name | VARCHAR | The name of the model to rename. |
new model name | VARCHAR | The new name of the model. |
SQL
DROP MLMODEL
Drop a machine learning model. Use theIF EXISTS clause to ignore any models that do not exist.
Syntax
SQL
| Parameter | Data Type | Description |
|---|---|---|
model name | VARCHAR | The name of the model to drop. You can drop multiple models by specifying additional names and separating each with commas. |
my_model.
SQL
SQL
EXPORT MLMODEL
Return the SQL statement that can recreate the machine learning model. SyntaxSQL
| Parameter | Data Type | Description |
|---|---|---|
model name | VARCHAR | The name of the model to create. |
SQL
SQL
REFRESH MLMODEL
Retrain a machine learning model without changing any model options. SyntaxSQL
| Parameter | Data Type | Description |
|---|---|---|
model name | VARCHAR | The name of the model to retrain. |
SQL

