SQL Reference
Machine Learning Model Functions
{{ocientml}} functionality supports these sql functions for machine learning models the scope of a machine learning model is the schema supported machine learning models supported machine learning models and reference material are divided into these categories for functions to help organize data before training a model, see docid\ vrwcjklivsomyas4ude8b regression models docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j docid\ vnnvgywudilgqn1tmn4 j classification models docid\ oz7w9viouqc4ledje98yp docid\ oz7w9viouqc4ledje98yp docid\ oz7w9viouqc4ledje98yp docid\ oz7w9viouqc4ledje98yp docid\ oz7w9viouqc4ledje98yp docid\ oz7w9viouqc4ledje98yp docid\ oz7w9viouqc4ledje98yp clustering and dimension reduction models docid\ ol65mcdaukgeishjo0lhs docid\ ol65mcdaukgeishjo0lhs docid\ ol65mcdaukgeishjo0lhs docid\ ol65mcdaukgeishjo0lhs other models docid\ fjshnbf3erq wkd6tzrjo docid\ fjshnbf3erq wkd6tzrjo execute a query using a machine learning model to create a machine learning model and manage the model, see docid\ jyvggzczktiksnbvb4msz for the corresponding syntax after you create the model, you can execute a query using the model with this syntax syntax select model name ( expression \[, ] ) from table reference parameter data type description model name identifier the name of a machine learning model created using a create model sql statement the model name must be a valid identifier and reference an existing trained model expression identifier string numeric one or more expressions that serve as input features for the machine learning model evaluation these expressions must match the expected input schema the model was trained on expressions can be any combination of literal values, column names, arithmetic expressions, and function invocations, with parentheses for grouping table reference identifier the name of a table, view, or subquery that provides the data for model evaluation the table must contain columns or computed expressions that match the expected input features of the model example create a table with data for the model create table mldemo mlr as (select a c1 as x1, b c1 as x2, 1 + 2 a c1 + 3 b c1 as y from sys dummy10 a, sys dummy10 b); modified 100 rows create a multiple linear regression model based on the data create mlmodel mlr model type multiple linear regression on (select from mldemo mlr) options('metrics' > 'true'); modified 0 rows execute a select query against the multiple linear regression to see the actual and predicted values limit the result set to 10 rows select x1, x2, y as actual, mlr model(x1, x2) as predicted from mldemo mlr limit 10; output x1 x2 actual predicted \ 6 1 16 15 999999999999975 6 2 19 18 999999999999975 6 3 22 21 999999999999975 6 4 25 24 999999999999975 6 5 28 27 999999999999975 6 6 31 30 999999999999975 6 7 34 33 99999999999997 6 8 37 36 99999999999997 6 9 40 39 99999999999997 6 10 43 42 99999999999997 fetched 10 rows related links docid\ pstuxvbgmg7vzwjjvyxpd docid\ jyvggzczktiksnbvb4msz