Machine Learning Model Functions
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 data preparation docid\ kconajitkime6g2rh7nv2 regression models simple linear regression docid\ qfdqftaykbn7kuiom2zq1 multiple linear regression docid\ qfdqftaykbn7kuiom2zq1 vector autoregression docid\ qfdqftaykbn7kuiom2zq1 polynomial regression docid\ qfdqftaykbn7kuiom2zq1 linear combination regression docid\ qfdqftaykbn7kuiom2zq1 nonlinear regression docid\ qfdqftaykbn7kuiom2zq1 gradient boosted trees docid\ qfdqftaykbn7kuiom2zq1 regression tree docid\ qfdqftaykbn7kuiom2zq1 classification models k nearest neighbor classification docid\ ncjwl44c3jqoyy 4jx gf naive bayes classification docid\ ncjwl44c3jqoyy 4jx gf decision tree docid\ ncjwl44c3jqoyy 4jx gf random forest docid\ ncjwl44c3jqoyy 4jx gf logistic regression docid\ ncjwl44c3jqoyy 4jx gf support vector machine docid\ ncjwl44c3jqoyy 4jx gf gradient boosted trees docid\ ncjwl44c3jqoyy 4jx gf clustering and dimension reduction models principal component analysis docid\ vuj3b26x36jrfwm2rradj k means clustering docid\ vuj3b26x36jrfwm2rradj gaussian mixture docid\ vuj3b26x36jrfwm2rradj linear discriminant analysis docid\ vuj3b26x36jrfwm2rradj ensemble models bagging docid\ khtmcnhtcv5jqdz02vkew boosting docid\ khtmcnhtcv5jqdz02vkew stacking docid\ khtmcnhtcv5jqdz02vkew other models association rules docid\ ofemywytpvg64t7uwlwp feedforward neural network docid\ ofemywytpvg64t7uwlwp for a view of the full list of model options, see machine learning model options docid\ xotqi xivv 1md1syeict execute a query using a machine learning model to create a machine learning model and manage the model, see machine learning models docid\ cvgbq68buupk4dltsgj2v 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 machine learning in ocient docid\ oja43vqudjt25sfxl5iij machine learning models docid\ cvgbq68buupk4dltsgj2v