<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Machine learning algorithms</title>
    <link>/en/sql-reference/functions/ml-functions/ml-algorithms/</link>
    <description>Recent content in Machine learning algorithms on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/functions/ml-functions/ml-algorithms/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: ARIMA</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/arima/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/arima/</guid>
      <description>
        
        
        &lt;p&gt;Creates and trains an autoregressive integrated moving average (ARIMA) model from a time series with consistent timesteps. ARIMA models combine the abilities of &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/autoregressor/#&#34;&gt;AUTOREGRESSOR&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/moving-average/#&#34;&gt;MOVING_AVERAGE&lt;/a&gt; models by making future predictions based on both preceding time series values and errors of previous predictions. ARIMA models also provide the option to apply a differencing operation to the input data, which can turn a non-stationary time series into a stationary time series. After the model is trained, you can make predictions with the &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-arima/#&#34;&gt;PREDICT_ARIMA&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;In OpenText™ Analytics Database, ARIMA is implemented using a Kalman Filter state-space approach, similar to &lt;a href=&#34;https://www.stat.berkeley.edu/~spector/s244/as154.pdf&#34;&gt;Gardner, G., et al&lt;/a&gt;. This approach updates the state-space model with each element in the training data in order to calculate a loss score over the training data. A &lt;a href=&#34;https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm&#34;&gt;BFGS optimizer&lt;/a&gt; is then used to adjust the coefficients, and the state-space estimation is rerun until convergence. Because of this repeated estimation process, ARIMA consumes large amounts of memory when called with high values of &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Given that the input data must be sorted by timestamp, this algorithm is single-threaded.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ARIMA( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;timeseries-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;timestamp-column&lt;/span&gt;&amp;#39;
    USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;param&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the table or view containing &lt;em&gt;&lt;code&gt;timeseries-column&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;timeseries-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of a NUMERIC column in &lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt; that contains the dependent variable or outcome.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of an INTEGER, FLOAT, or TIMESTAMP column in &lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt; that represents the timestamp variable. The timestep between consecutive entries should be consistent throughout the &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;.

&lt;div class=&#34;alert admonition tip&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Tip&lt;/h4&gt;

If your &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt; has varying timesteps, consider standardizing the step size with the &lt;a href=&#34;../../../../../en/sql-reference/functions/data-type-specific-functions/datetime-functions/time-slice/#&#34;&gt;TIME_SLICE&lt;/a&gt; function.

&lt;/div&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;p&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [0, 1000], the number of lags to include in the autoregressive component of the computation. If &lt;code&gt;q&lt;/code&gt; is unspecified or set to zero, &lt;code&gt;p&lt;/code&gt; must be set to a nonzero value. In some cases, using a large &lt;code&gt;p&lt;/code&gt; value can result in a memory overload error.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/autoregressor/#&#34;&gt;AUTOREGRESSOR&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/arima/#&#34;&gt;ARIMA&lt;/a&gt; models use different training techniques that produce distinct models when trained with matching parameter values on the same data. For example, if you train an autoregressor model using the same data and &lt;code&gt;p&lt;/code&gt; value as an ARIMA model trained with &lt;code&gt;d&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; parameters set to zero, those two models will not be identical.

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;d&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [0, 10], the difference order of the model.
&lt;p&gt;If the &lt;em&gt;&lt;code&gt;timeseries-column&lt;/code&gt;&lt;/em&gt; is a non-stationary time series, whose statistical properties change over time, you can specify a non-zero &lt;code&gt;d&lt;/code&gt; value to difference the input data. This operation can remove or reduce trends in the time series data.&lt;/p&gt;
&lt;p&gt;Differencing computes the differences between consecutive time series values and then trains the model on these values. The difference order &lt;code&gt;d&lt;/code&gt;, where 0 implies no differencing, determines how many times to repeat the differencing operation. For example, second-order differencing takes the results of the first-order operation and differences these values again to obtain the second-order values. For an example that trains an ARIMA model that uses differencing, see &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/arima-model-example/#&#34;&gt;ARIMA model example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;q&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [0, 1000], the number of lags to include in the moving average component of the computation. If &lt;code&gt;p&lt;/code&gt; is unspecified or set to zero, &lt;code&gt;q&lt;/code&gt; must be set to a nonzero value. In some cases, using a large &lt;code&gt;q&lt;/code&gt; value can result in a memory overload error.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/moving-average/#&#34;&gt;MOVING_AVERAGE&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/arima/#&#34;&gt;ARIMA&lt;/a&gt; models use different training techniques that produce distinct models when trained with matching parameter values on the same data. For example, if you train a moving-average model using the same data and &lt;code&gt;q&lt;/code&gt; value as an ARIMA model trained with &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;d&lt;/code&gt; parameters set to zero, those two models will not be identical.

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;missing&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Method for handling missing values, one of the following strings:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#39;drop&#39;: Missing values are ignored.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;raise&#39;: Missing values raise an error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;zero&#39;: Missing values are set to zero.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;linear_interpolation&#39;: Missing values are replaced by a linearly interpolated value based on the nearest valid entries before and after the missing value. In cases where the first or last values in a dataset are missing, the function errors.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;linear_interpolation&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;init_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Initialization method, one of the following strings:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#39;Zero&#39;: Coefficients are initialized to zero.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;Hannan-Rissanen&#39; or &#39;HR&#39;: Coefficients are initialized using the Hannan-Rissanen algorithm.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;Zero&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0.0, 1.0), controls the convergence criteria of the optimization algorithm.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-6&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1, 1000000), the maximum number of training iterations. If you set this value too low, the algorithm might not converge.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 100&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;coefficients&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Coefficients of the model:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;phi&lt;/code&gt;: parameters for the autoregressive component of the computation. The number of returned &lt;code&gt;phi&lt;/code&gt; values is equal to the value of &lt;code&gt;p&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;theta&lt;/code&gt;: parameters for the moving average component of the computation. The number of returned &lt;code&gt;theta&lt;/code&gt; values is equal to the value of &lt;code&gt;q&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;p, q, d&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;ARIMA component values:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;p&lt;/code&gt;: number of lags included in the autoregressive component of the computation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;d&lt;/code&gt;: difference order of the model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;q&lt;/code&gt;: number of lags included in the moving average component of the computation&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;mean&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The model mean, average of the accepted sample values from &lt;em&gt;&lt;code&gt;timeseries-column&lt;/code&gt;&lt;/em&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Type of regularization used when training the model&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Regularization parameter. Higher values indicates stronger regularization.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;mean_squared_error&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Mean squared error of the model on the training set&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;rejected_row_count&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of samples rejected during training&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;accepted_row_count&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of samples accepted for training from the data set&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;timeseries_name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the &lt;em&gt;&lt;code&gt;timeseries-column&lt;/code&gt;&lt;/em&gt; used to train the model&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;timestamp_name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt; used to train the model&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;missing_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Method used for handling missing values&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;call_string&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;SQL statement used to train the model&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The function requires that at least one of the &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; parameters be a positive, nonzero integer. The following example trains a model where both of these parameters are set to two:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARIMA&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;arima_temp&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temp_data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temperature&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;time&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PARAMETERS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;q&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;               &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARIMA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Finished&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;iterations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3650&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accepted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rejected&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To see a summary of the model, including all model coefficients and parameter values, call &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GET_MODEL_SUMMARY&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PARAMETERS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;model_name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;arima_temp&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GET_MODEL_SUMMARY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;coefficients&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;parameter&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------+--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;phi_1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;23639&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;phi_2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;24201&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;theta_1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;64535&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;theta_2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;23046&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;regularization&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;none&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;===============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;timeseries_name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;===============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;temperature&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;timestamp_name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;missing_method&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;linear_interpolation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;===========&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;call_string&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;===========&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ARIMA&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;public.arima_temp&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temp_data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temperature&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;time&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PARAMETERS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;q&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;missing&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;linear_interpolation&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;init_method&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Zero&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;epsilon&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;06&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;max_iterations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;===============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Additional&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Info&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;===============&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Value&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;------------------+--------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;q&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;d&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mean&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;       &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;17775&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;lambda&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;00000&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mean_squared_error&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;80628&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rejected_row_count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accepted_row_count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3650&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For an in-depth example that trains and makes predictions with ARIMA models, see &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/arima-model-example/#&#34;&gt;ARIMA model example&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/#&#34;&gt;Time series forecasting&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-attribute/#&#34;&gt;GET_MODEL_ATTRIBUTE&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: AUTOREGRESSOR</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/autoregressor/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/autoregressor/</guid>
      <description>
        
        
        &lt;p&gt;Creates and trains an autoregression (AR) or vector autoregression (VAR) model, depending on the number of provided value columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One value column: the function executes autoregression and returns a trained AR model. AR is a univariate autoregressive time series algorithm that predicts a variable&#39;s future values based on its preceding values. The user specifies the number of lagged timesteps taken into account during computation, and the model then predicts future values as a linear combination of the values at each lag.&lt;/li&gt;
&lt;li&gt;Multiple value columns: the function executes vector autoregression and returns a trained VAR model. VAR is a multivariate autoregressive time series algorithm that captures the relationship between multiple time series variables over time. Unlike AR, which only considers a single variable, VAR models incorporate feedback between different variables in the model, enabling the model to analyze how variables interact across lagged time steps. For example, with two variables—atmospheric pressure and rain accumulation—a VAR model could determine whether a drop in pressure tends to result in rain at a future date.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To make predictions with a VAR or AR model, use the &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-autoregressor/#&#34;&gt;PREDICT_AUTOREGRESSOR&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;Because the input data must be sorted by timestamp, this function is single-threaded.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;AUTOREGRESSOR (&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;value-columns&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;timestamp-column&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;param&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view containing &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code&gt;value-columns&lt;/code&gt;&lt;/em&gt;.
&lt;p&gt;This algorithm expects a stationary time series as input; using a time series with a mean that shifts over time may lead to weaker results.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;value-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of one or more NUMERIC input columns that contain the dependent variables or outcomes.
&lt;p&gt;The number of value columns determines whether the function performs the autoregression (AR) or vector autoregression (VAR) algorithm. If only one input column is provided, the function executes autoregression. For multiple input columns, the function performs the VAR algorithm.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of an INTEGER, FLOAT, or TIMESTAMP column in &lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt; that represents the timestamp variable. The timestep between consecutive entries must be consistent throughout the &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;.

&lt;div class=&#34;alert admonition tip&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Tip&lt;/h4&gt;

If your &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt; has varying timesteps, consider standardizing the step size with the &lt;a href=&#34;../../../../../en/sql-reference/functions/data-type-specific-functions/datetime-functions/time-slice/#&#34;&gt;TIME_SLICE&lt;/a&gt; function.

&lt;/div&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;p&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;INTEGER in the range [1, 1999], the number of lags to consider in the computation. Larger values for &lt;code&gt;p&lt;/code&gt; weaken the correlation.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/autoregressor/#&#34;&gt;AUTOREGRESSOR&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/arima/#&#34;&gt;ARIMA&lt;/a&gt; models use different training techniques that produce distinct models when trained with matching parameter values on the same data. For example, if you train an autoregressor model using the same data and &lt;code&gt;p&lt;/code&gt; value as an ARIMA model trained with &lt;code&gt;d&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; parameters set to zero, those two models will not be identical.

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 3&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following algorithms for training the model:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#39;OLS&#39; (Ordinary Least Squares)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;Yule-Walker&#39;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;OLS&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;missing&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following methods for handling missing values:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#39;drop&#39;: Missing values are ignored.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;error&#39;: Missing values raise an error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;zero&#39;: Missing values are replaced with 0.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;linear_interpolation&#39;: Missing values are replaced by linearly-interpolated values based on the nearest valid entries before and after the missing value. This means that in cases where the first or last values in a dataset are missing, they will simply be dropped. The VAR algorithm does not support linear interpolation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The default method depends on the model type:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AR: &#39;linear_interpolation&#39;&lt;/li&gt;
&lt;li&gt;VAR: &#39;error&#39;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;For the OLS training method only, one of the following regularization methods used when fitting the data:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#39;L2&#39;: Weight regularization term which penalizes the squared weight value&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; None&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;For the OLS training method only, FLOAT in the range [0, 100000], the regularization value, lambda.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;compute_mse&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;BOOLEAN, whether to calculate and output the mean squared error (MSE).
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; False&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;subtract_mean&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;BOOLEAN, whether the mean of each column in &lt;em&gt;&lt;code&gt;value-columns&lt;/code&gt;&lt;/em&gt; is subtracted from its column values before calculating the model coefficients. This parameter only applies if &lt;code&gt;method&lt;/code&gt; is set to &#39;Yule-Walker&#39;. If set to False, the model saves the column means as zero.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example creates and trains an autoregression model using the Yule-Walker training algorithm and a lag of 3:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTOREGRESSOR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;AR_temperature_yw&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temp_data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Temperature&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;time&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PARAMETERS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;method&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;yule-walker&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTOREGRESSOR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Finished&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3650&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accepted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rejected&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example creates and trains a VAR model with a lag of 2:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTOREGRESSOR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;VAR_temperature&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temp_data_VAR&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;temp_location1, temp_location2&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;time&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;PARAMETERS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WARNING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Only&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;the&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Yule&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Walker&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;method&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;is&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;currently&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;supported&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Vector&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Autoregression&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;setting&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;method&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;to&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Yule&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Walker&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AUTOREGRESSOR&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;---------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Finished&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3650&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accepted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rejected&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;See &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/ar-and-var.md/autoregressive-model-example/#&#34;&gt;Autoregressive model example&lt;/a&gt; and &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/ar-and-var.md/var-example/#&#34;&gt;VAR model example&lt;/a&gt; for extended examples that train and make predictions with AR and VAR models.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-autoregressor/#&#34;&gt;PREDICT_AUTOREGRESSOR&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: BISECTING_KMEANS</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/bisecting-kmeans/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/bisecting-kmeans/</guid>
      <description>
        
        
        &lt;p&gt;Executes the bisecting k-means algorithm on an input relation. The result is a trained model with a hierarchy of cluster centers, with a range of &lt;em&gt;k&lt;/em&gt; values, each of which can be used for prediction.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;BISECTING_KMEANS(&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-columns&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;num-clusters&lt;/span&gt;&amp;#39;
           [ USING PARAMETERS
                 [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;exclude-columns&lt;/span&gt;&amp;#39;]
                 [, bisection_iterations = &lt;span class=&#34;code-variable&#34;&gt;bisection-iterations&lt;/span&gt;]
                 [, split_method = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;split-method&lt;/span&gt;&amp;#39;]
                 [, min_divisible_cluster_size = &lt;span class=&#34;code-variable&#34;&gt;min-cluster-size&lt;/span&gt;]
                 [, kmeans_max_iterations = &lt;span class=&#34;code-variable&#34;&gt;kmeans-max-iterations&lt;/span&gt;]
                 [, kmeans_epsilon = &lt;span class=&#34;code-variable&#34;&gt;kmeans-epsilon&lt;/span&gt;]
                 [, kmeans_center_init_method = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;kmeans-init-method&lt;/span&gt;&amp;#39;]
                 [, distance_method = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;distance-method&lt;/span&gt;&amp;#39;]
                 [, output_view = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;output-view&lt;/span&gt;&amp;#39;]
                 [, key_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;key-columns&lt;/span&gt;&amp;#39;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Table or view that contains the input data for k-means. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns to use from the input relation, or asterisk (*) to select all columns. Input columns must be of data type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;num-clusters&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Number of clusters to create, an integer ≤ 10,000. This argument represents the &lt;em&gt;&lt;code&gt;k&lt;/code&gt;&lt;/em&gt; in k-means.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of column names from &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;bisection_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer between 1 - 1MM inclusive, specifies number of iterations the bisecting k-means algorithm performs for each bisection step. This corresponds to how many times a standalone k-means algorithm runs in each bisection step.
&lt;p&gt;A setting &amp;gt;1 allows the algorithm to run and choose the best k-means run within each bisection step. If you use kmeanspp, the value of &lt;code&gt;bisection_iterations&lt;/code&gt; is always 1, because kmeanspp is more costly to run but also better than the alternatives, so it does not require multiple runs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;split_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The method used to choose a cluster to bisect/split, one of:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;size&lt;/code&gt;: Choose the largest cluster to bisect.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;sum_squares&lt;/code&gt;: Choose the cluster with the largest within-cluster sum of squares to bisect.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;sum_squares&lt;/code&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_divisible_cluster_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer ≥ 2, specifies minimum number of points of a divisible cluster.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 2&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;kmeans_max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer between 1 and 1MM inclusive, specifies the maximum number of iterations the k-means algorithm performs. If you set this value to a number lower than the number of iterations needed for convergence, the algorithm might not converge.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;kmeans_epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer between 1 and 1MM inclusive, determines whether the k-means algorithm has converged. The algorithm is considered converged after no center has moved more than a distance of &lt;em&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/em&gt; from the previous iteration.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-4&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;kmeans_center_init_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The method used to find the initial cluster centers in k-means, one of:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;kmeanspp&lt;/code&gt; (default): kmeans++ algorithm&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;pseudo&lt;/code&gt;: Uses &amp;quot;pseudo center&amp;quot; approach used by Spark, bisects given center without iterating over points&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;distance_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The measure for distance between two data points. Only Euclidean distance is supported at this time.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;euclidean&lt;/code&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;output_view&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the view where you save the assignment of each point to its cluster. You must have CREATE privileges on the view schema.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;key_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of column names that identify the output rows. Columns must be in the &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; argument list. To exclude these and other input columns from being used by the algorithm, list them in parameter &lt;code&gt;exclude_columns&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;centers&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A list of centers of the K centroids.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;hierarchy&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The hierarchy of K clusters, including:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ParentCluster: Parent cluster centroid of each centroid—that is, the centroid of the cluster from which a cluster is obtained by bisection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;LeftChildCluster: Left child cluster centroid of each centroid—that is, the centroid of the first sub-cluster obtained by bisecting a cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RightChildCluster: the right child cluster centroid of each centroid—that is, the centroid of the second sub-cluster obtained by bisecting a cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BisectionLevel: Specifies which bisection step a cluster is obtained from.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;WithinSS: Within-cluster sum of squares for the current cluster&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TotalWithinSS: Total within-cluster sum of squares of leaf clusters thus far obtained.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Several metrics related to the quality of the clustering, including
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Total sum of squares&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Total within-cluster sum of squares&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Between-cluster sum of squares&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Between-cluster sum of squares / Total sum of squares&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sum of squares for cluster &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;, center_id &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;[...]&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT BISECTING_KMEANS(&amp;#39;myModel&amp;#39;, &amp;#39;iris1&amp;#39;, &amp;#39;*&amp;#39;, &amp;#39;5&amp;#39;
       USING PARAMETERS exclude_columns = &amp;#39;Species,id&amp;#39;, split_method =&amp;#39;sum_squares&amp;#39;, output_view = &amp;#39;myBKmeansView&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/clustering-algorithms/bisecting-k-means/clustering-data-hierarchically-using-bisecting-k-means/#&#34;&gt;Clustering data hierarchically using bisecting k-means&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/apply-bisecting-kmeans/#&#34;&gt;APPLY_BISECTING_KMEANS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: KMEANS</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/kmeans/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/kmeans/</guid>
      <description>
        
        
        &lt;p&gt;Executes the k-means algorithm on an input relation. The result is a model with a list of cluster centers.&lt;/p&gt;
&lt;p&gt;You can export the resulting k-means model in VERTICA_MODELS or PMML format to apply it on data outside OpenText™ Analytics Database. You can also train a k-means model elsewhere, then import it to the database in PMML format to predict on data in the database.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;KMEANS ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-columns&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;num-clusters&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
           [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
           [, max_iterations = &lt;span class=&#34;code-variable&#34;&gt;max-iterations&lt;/span&gt;]
           [, epsilon = &lt;span class=&#34;code-variable&#34;&gt;epsilon-value&lt;/span&gt;]
           [, { init_method = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;init-method&lt;/span&gt;&amp;#39; } | { initial_centers_table = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;init-table&lt;/span&gt;&amp;#39; } ]
           [, output_view = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;output-view&lt;/span&gt;&amp;#39;]
           [, key_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;key-columns&lt;/span&gt;&amp;#39;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the input data for k-means. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns to use from the input relation, or asterisk (*) to select all columns. Input columns must be of data type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;num-clusters&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The number of clusters to create, an integer ≤ 10,000. This argument represents the &lt;em&gt;&lt;code&gt;k&lt;/code&gt;&lt;/em&gt; in k-means.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Parameters &lt;code&gt;init_method&lt;/code&gt; and &lt;code&gt;initial_centers_table&lt;/code&gt; are mutually exclusive. If you set both, the function returns an error.
&lt;/div&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of column names from &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The maximum number of iterations the algorithm performs. If you set this value to a number lower than the number of iterations needed for convergence, the algorithm may not converge.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Determines whether the algorithm has converged. The algorithm is considered converged after no center has moved more than a distance of&lt;br /&gt;&#39;epsilon&#39; from the previous iteration.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-4&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;init_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The method used to find the initial cluster centers, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;random&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;kmeanspp&lt;/code&gt; (default): kmeans++ algorithm&lt;/p&gt;
&lt;p&gt;This value can be memory intensive for high k. If the function returns an error that not enough memory is available, decrease the value of k or use the &lt;code&gt;random&lt;/code&gt; method.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;initial_centers_table&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The table with the initial cluster centers to use. Supply this value if you know the initial centers to use and do not want the database to find the initial cluster centers for you.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;output_view&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the view where you save the assignments of each point to its cluster. You must have CREATE privileges on the schema where the view is saved.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;key_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of column names from &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; that will appear as the columns of &lt;code&gt;output_view&lt;/code&gt;. These columns should be picked such that their contents identify each input data point. This parameter is only used if &lt;code&gt;output_view&lt;/code&gt; is specified. Columns listed in &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; that are only meant to be used as &lt;code&gt;key_columns&lt;/code&gt; and not for training should be listed in &lt;code&gt;exclude_columns&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;centers&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A list that contains the center of each cluster.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A string summary of several metrics related to the quality of the clustering.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example creates k-means model &lt;code&gt;myKmeansModel&lt;/code&gt; and applies it to input table &lt;code&gt;iris1&lt;/code&gt;. The call to &lt;code&gt;APPLY_KMEANS&lt;/code&gt; mixes column names and constants. When a constant is passed in place of a column name, the constant is substituted for the value of the column in all rows:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT KMEANS(&amp;#39;myKmeansModel&amp;#39;, &amp;#39;iris1&amp;#39;, &amp;#39;*&amp;#39;, 5
USING PARAMETERS max_iterations=20, output_view=&amp;#39;myKmeansView&amp;#39;, key_columns=&amp;#39;id&amp;#39;, exclude_columns=&amp;#39;Species, id&amp;#39;);
           KMEANS
----------------------------
 Finished in 12 iterations

(1 row)
=&amp;gt; SELECT id, APPLY_KMEANS(Sepal_Length, 2.2, 1.3, Petal_Width
USING PARAMETERS model_name=&amp;#39;myKmeansModel&amp;#39;, match_by_pos=&amp;#39;true&amp;#39;) FROM iris2;
 id  | APPLY_KMEANS
-----+--------------
   5 |            1
  10 |            1
  14 |            1
  15 |            1
  21 |            1
  22 |            1
  24 |            1
  25 |            1
  32 |            1
  33 |            1
  34 |            1
  35 |            1
  38 |            1
  39 |            1
  42 |            1
...
 (60 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/clustering-algorithms/k-means/clustering-data-using-k-means/#&#34;&gt;Clustering data using k-means&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/apply-kmeans/#&#34;&gt;APPLY_KMEANS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/import-models/#&#34;&gt;IMPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-pmml/#&#34;&gt;PREDICT_PMML&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: KPROTOTYPES</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/kprototypes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/kprototypes/</guid>
      <description>
        
        
        &lt;p&gt;Executes the k-prototypes algorithm on an input relation. The result is a model with a list of cluster centers.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT KPROTOTYPES (&amp;#39;`*`model-name`*`&amp;#39;, &amp;#39;`*`input-relation`*`&amp;#39;, &amp;#39;`*`input-columns`*`&amp;#39;, `*`num-clusters`*`
                [USING PARAMETERS [exclude_columns = &amp;#39;`*`exclude-columns`*`&amp;#39;]
                [, max_iterations = &amp;#39;`*`max-iterations`*`&amp;#39;]
                [, epsilon = `*`epsilon`*`]
                [, {[init_method = &amp;#39;`*`init-method`*`&amp;#39;] } | { initial_centers_table = &amp;#39;`*`init-table`*`&amp;#39; } ]
                [, gamma = &amp;#39;`*`gamma`*`&amp;#39;]
                [, output_view = &amp;#39;`*`output-view`*`&amp;#39;]
                [, key_columns = &amp;#39;`*`key-columns`*`&amp;#39;]]);
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the model resulting from the training.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the table or view containing the training samples.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;String containing a comma-separated list of columns to use from the input-relation, or asterisk (*) to select all columns.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;num-clusters&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Integer					≤ 10,000 representing the number of clusters to create. This argument represents the k in k-prototypes.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude-columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;String containing a comma-separated list of column names from input-columns to exclude from processing.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; (empty)&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer						≤ 1M representing the maximum number of iterations the algorithm performs.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Integer ≤ 1M&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer which determines whether the algorithm has converged.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-4&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;init_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;String specifying the method used to find the initial k-prototypes cluster centers.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &amp;quot;random&amp;quot;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;initial_centers_table&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The table with the initial cluster centers to use.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;gamma&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float between 0 and 10000 specifying the weighing factor for categorical columns. It can determine relative importance of numerical and categorical attributes
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Inferred from data.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;output_view&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the view where you save the assignments of each point to its cluster&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;key_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of column names that identify the output rows. Columns must be in the input-columns argument list&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example creates k-prototypes model &lt;code&gt;small_model&lt;/code&gt; and applies it to input table &lt;code&gt;small_test_mixed&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT KPROTOTYPES(&amp;#39;small_model_initcenters&amp;#39;, &amp;#39;small_test_mixed&amp;#39;, &amp;#39;x0, country&amp;#39;, 3 USING PARAMETERS initial_centers_table=&amp;#39;small_test_mixed_centers&amp;#39;, key_columns=&amp;#39;pid&amp;#39;);
      KPROTOTYPES
---------------------------
Finished in 2 iterations

(1 row)

=&amp;gt; SELECT country, x0, APPLY_KPROTOTYPES(country, x0
USING PARAMETERS model_name=&amp;#39;small_model&amp;#39;)
FROM small_test_mixed;
  country   | x0  | apply_kprototypes
------------+-----+-------------------
 &amp;#39;China&amp;#39;    |  20 |                 0
 &amp;#39;US&amp;#39;       |  85 |                 2
 &amp;#39;Russia&amp;#39;   |  80 |                 1
 &amp;#39;Brazil&amp;#39;   |  78 |                 1
 &amp;#39;US&amp;#39;       |  23 |                 0
 &amp;#39;US&amp;#39;       |  50 |                 0
 &amp;#39;Canada&amp;#39;   |  24 |                 0
 &amp;#39;Canada&amp;#39;   |  18 |                 0
 &amp;#39;Russia&amp;#39;   |  90 |                 2
 &amp;#39;Russia&amp;#39;   |  98 |                 2
 &amp;#39;Brazil&amp;#39;   |  89 |                 2
...
(45 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/apply-kprototypes/&#34;&gt;APPLY_KPROTOTYPES&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/kmeans/#&#34;&gt;KMEANS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: LINEAR_REG</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/linear-reg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/linear-reg/</guid>
      <description>
        
        
        &lt;p&gt;Executes linear regression on an input relation, and returns a linear regression model.&lt;/p&gt;
&lt;p&gt;You can export the resulting linear regression model in VERTICA_MODELS or PMML format to apply it on data outside OpenText™ Analytics Database. You can also train a linear regression model elsewhere, then import it to the database in PMML format to model on data inside the database.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;LINEAR_REG ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, optimizer = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;optimizer-method&lt;/span&gt;&amp;#39;]
              [, regularization = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;regularization-method&lt;/span&gt;&amp;#39;]
              [, epsilon = &lt;span class=&#34;code-variable&#34;&gt;epsilon-value&lt;/span&gt;]
              [, max_iterations = &lt;span class=&#34;code-variable&#34;&gt;iterations&lt;/span&gt;]
              [, lambda = &lt;span class=&#34;code-variable&#34;&gt;lamda-value&lt;/span&gt;]
              [, alpha = &lt;span class=&#34;code-variable&#34;&gt;alpha-value&lt;/span&gt;]
              [, fit_intercept = &lt;span class=&#34;code-variable&#34;&gt;boolean-value&lt;/span&gt;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Table or view that contains the training data for building the model. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the input column that represents the dependent variable or outcome. All values in this column must be &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, otherwise the model is invalid.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;
&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN; otherwise the model is invalid.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

All BOOLEAN predictor values are converted to FLOAT values before training: 0 for false, 1 for true. No type checking occurs during prediction, so you can use a BOOLEAN predictor column in training, and during prediction provide a FLOAT column of the same name. In this case, all FLOAT values must be either 0 or 1.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;optimizer&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Optimizer method used to train the model, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://link.springer.com/chapter/10.1007/978-3-319-18032-8_54&#34;&gt;Newton&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Broyden–Fletcher–Goldfarb–Shanno_algorithm&#34;&gt;BFGS&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://link.springer.com/article/10.1007/s10107-007-0170-0&#34;&gt;CGD&lt;/a&gt;&lt;/p&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
If you select &lt;code&gt;CGD&lt;/code&gt;, &lt;em&gt;&lt;code&gt;regularization-method&lt;/code&gt;&lt;/em&gt; must be set to &lt;code&gt;L1&lt;/code&gt; or &lt;code&gt;ENet&lt;/code&gt;, otherwise the function returns an error.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;CGD&lt;/code&gt; if &lt;em&gt;&lt;code&gt;regularization-method&lt;/code&gt;&lt;/em&gt; is set to &lt;code&gt;L1&lt;/code&gt; or &lt;code&gt;ENet&lt;/code&gt;, otherwise &lt;code&gt;Newton&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Method of regularization, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;None&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;L1&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;L2&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ENet&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;FLOAT in the range (0.0, 1.0), the error value at which to stop training. Training stops if either the difference between the actual and predicted values is less than or equal to &lt;code&gt;epsilon&lt;/code&gt; or if the number of iterations exceeds &lt;code&gt;max_iterations&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-6&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;INTEGER in the range (0, 1000000), the maximum number of training iterations. Training stops if either the number of iterations exceeds &lt;code&gt;max_iterations&lt;/code&gt; or if the difference between the actual and predicted values is less than or equal to &lt;code&gt;epsilon&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 100&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer ≥ 0, specifies the value of the &lt;code&gt;regularization&lt;/code&gt; parameter.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer ≥ 0, specifies the value of the ENET &lt;code&gt;regularization&lt;/code&gt; parameter, which defines how much L1 versus L2 regularization to provide. A value of 1 is equivalent to L1 and a value of 0 is equivalent to L2.
&lt;p&gt;&lt;strong&gt;Value range:&lt;/strong&gt; [0,1]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.5&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fit_intercept&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean, specifies whether the model includes an intercept. By setting to false, no intercept will be used in training the model. Note that setting &lt;code&gt;fit_intercept&lt;/code&gt; to false does not work well with the BFGS optimizer.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; True&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;data&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The data for the function, including:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coeffNames&lt;/code&gt;: Name of the coefficients. This starts with intercept and then follows with the names of the predictors in the same order specified in the call.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coeff&lt;/code&gt;: Vector of estimated coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;stdErr&lt;/code&gt;: Vector of the standard error of the coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;zValue&lt;/code&gt; (for logistic regression): Vector of z-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;tValue&lt;/code&gt; (for linear regression): Vector of t-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;pValue&lt;/code&gt;: Vector of p-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Type of regularization to use when training the model.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Regularization parameter. Higher values enforce stronger regularization. This value must be nonnegative.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Elastic net mixture parameter.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of iterations that actually occur for the convergence before exceeding &lt;code&gt;max_iterations&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;skippedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of rows of the input relation that were skipped because they contained an invalid value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;processedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Total number of input relation rows minus &lt;code&gt;skippedRows&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Value of all input arguments specified when the function was called.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LINEAR_REG(&amp;#39;myLinearRegModel&amp;#39;, &amp;#39;faithful&amp;#39;, &amp;#39;eruptions&amp;#39;, &amp;#39;waiting&amp;#39;
                      USING PARAMETERS optimizer=&amp;#39;BFGS&amp;#39;, fit_intercept=true);
         LINEAR_REG
----------------------------
 Finished in 10 iterations

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/linear-regression/building-linear-regression-model/#&#34;&gt;Building a linear regression model&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-linear-reg/#&#34;&gt;PREDICT_LINEAR_REG&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-pmml/#&#34;&gt;PREDICT_PMML&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/import-models/#&#34;&gt;IMPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: LOGISTIC_REG</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/logistic-reg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/logistic-reg/</guid>
      <description>
        
        
        &lt;p&gt;Executes logistic regression on an input relation. The result is a logistic regression model.&lt;/p&gt;
&lt;p&gt;You can export the resulting logistic regression model in VERTICA_MODELS or PMML format to apply it on data outside OpenText™ Analytics Database. You can also train a logistic regression model elsewhere, then import it to the database in PMML format to predict on data in the database.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;LOGISTIC_REG ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, optimizer = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;optimizer-method&lt;/span&gt;&amp;#39;]
              [, regularization = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;regularization-method&lt;/span&gt;&amp;#39;]
              [, epsilon = &lt;span class=&#34;code-variable&#34;&gt;epsilon-value&lt;/span&gt;]
              [, max_iterations = &lt;span class=&#34;code-variable&#34;&gt;iterations&lt;/span&gt;]
              [, lambda = &lt;span class=&#34;code-variable&#34;&gt;lamda-value&lt;/span&gt;]
              [, alpha = &lt;span class=&#34;code-variable&#34;&gt;alpha-value&lt;/span&gt;]
              [, fit_intercept = &lt;span class=&#34;code-variable&#34;&gt;boolean-value&lt;/span&gt;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training data for building the model. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The input column that represents the dependent variable or outcome. The column value must be 0 or 1, and of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN. The function automatically skips all other values.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;
&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN; otherwise the model is invalid.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

All BOOLEAN predictor values are converted to FLOAT values before training: 0 for false, 1 for true. No type checking occurs during prediction, so you can use a BOOLEAN predictor column in training, and during prediction provide a FLOAT column of the same name. In this case, all FLOAT values must be either 0 or 1.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;optimizer&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The optimizer method used to train the model, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://link.springer.com/chapter/10.1007/978-3-319-18032-8_54&#34;&gt;Newton&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Broyden–Fletcher–Goldfarb–Shanno_algorithm&#34;&gt;BFGS&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://link.springer.com/article/10.1007/s10107-007-0170-0&#34;&gt;CGD&lt;/a&gt;&lt;/p&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
If you select &lt;code&gt;CGD&lt;/code&gt;, &lt;em&gt;&lt;code&gt;regularization-method&lt;/code&gt;&lt;/em&gt; must be set to &lt;code&gt;L1&lt;/code&gt; or &lt;code&gt;ENet&lt;/code&gt;, otherwise the function returns an error.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &lt;code&gt;CGD&lt;/code&gt; if &lt;em&gt;&lt;code&gt;regularization-method&lt;/code&gt;&lt;/em&gt; is set to &lt;code&gt;L1&lt;/code&gt; or &lt;code&gt;ENet&lt;/code&gt;, otherwise &lt;code&gt;Newton&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The method of regularization, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;None&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;L1&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;L2&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ENet&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;FLOAT in the range (0.0, 1.0), the error value at which to stop training. Training stops if either the difference between the actual and predicted values is less than or equal to &lt;code&gt;epsilon&lt;/code&gt; or if the number of iterations exceeds &lt;code&gt;max_iterations&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-6&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;INTEGER in the range (0, 1000000), the maximum number of training iterations. Training stops if either the number of iterations exceeds &lt;code&gt;max_iterations&lt;/code&gt; or if the difference between the actual and predicted values is less than or equal to &lt;code&gt;epsilon&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 100&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer ≥ 0, specifies the value of the &lt;code&gt;regularization&lt;/code&gt; parameter.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer ≥ 0, specifies the value of the ENET &lt;code&gt;regularization&lt;/code&gt; parameter, which defines how much L1 versus L2 regularization to provide. A value of 1 is equivalent to L1 and a value of 0 is equivalent to L2.
&lt;p&gt;&lt;strong&gt;Value range:&lt;/strong&gt; [0,1]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.5&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fit_intercept&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean, specifies whether the model includes an intercept. By setting to false, no intercept will be used in training the model. Note that setting &lt;code&gt;fit_intercept&lt;/code&gt; to false does not work well with the BFGS optimizer.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; True&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;data&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The data for the function, including:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coeffNames&lt;/code&gt;: Name of the coefficients. This starts with intercept and then follows with the names of the predictors in the same order specified in the call.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coeff&lt;/code&gt;: Vector of estimated coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;stdErr&lt;/code&gt;: Vector of the standard error of the coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;zValue&lt;/code&gt; (for logistic regression): Vector of z-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;tValue&lt;/code&gt; (for linear regression): Vector of t-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;pValue&lt;/code&gt;: Vector of p-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Type of regularization to use when training the model.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Regularization parameter. Higher values enforce stronger regularization. This value must be nonnegative.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Elastic net mixture parameter.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of iterations that actually occur for the convergence before exceeding &lt;code&gt;max_iterations&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;skippedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of rows of the input relation that were skipped because they contained an invalid value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;processedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Total number of input relation rows minus &lt;code&gt;skippedRows&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Value of all input arguments specified when the function was called.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser, or SELECT privileges on the input relation&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LOGISTIC_REG(&amp;#39;myLogisticRegModel&amp;#39;, &amp;#39;mtcars&amp;#39;, &amp;#39;am&amp;#39;,
                       &amp;#39;mpg, cyl, disp, hp, drat, wt, qsec, vs, gear, carb&amp;#39;
                        USING PARAMETERS exclude_columns=&amp;#39;hp&amp;#39;, optimizer=&amp;#39;BFGS&amp;#39;, fit_intercept=true);
        LOGISTIC_REG
----------------------------
 Finished in 20 iterations

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/logistic-regression/building-logistic-regression-model/#&#34;&gt;Building a logistic regression model&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-logistic-reg/#&#34;&gt;PREDICT_LOGISTIC_REG&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-pmml/#&#34;&gt;PREDICT_PMML&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/import-models/#&#34;&gt;IMPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: MOVING_AVERAGE</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/moving-average/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/moving-average/</guid>
      <description>
        
        
        &lt;p&gt;Creates a moving-average (MA) model from a stationary time series with consistent timesteps that can then be used for prediction via &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-moving-average/#&#34;&gt;PREDICT_MOVING_AVERAGE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Moving average models use the errors of previous predictions to make future predictions. More specifically, the user-specified &lt;em&gt;lag&lt;/em&gt; determines how many previous predictions and errors it takes into account during computation.&lt;/p&gt;

&lt;p&gt;Since its input data must be sorted by timestamp, this algorithm is single-threaded.&lt;/p&gt;

&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;MOVING_AVERAGE (&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;data-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;timestamp-column&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [ q = &lt;span class=&#34;code-variable&#34;&gt;lags&lt;/span&gt; ]
              [, missing = &amp;#34;&lt;span class=&#34;code-variable&#34;&gt;imputation-method&lt;/span&gt;&amp;#34; ]
              [, regularization = &amp;#34;&lt;span class=&#34;code-variable&#34;&gt;regularization-method&lt;/span&gt;&amp;#34; ]
              [, lambda = &lt;span class=&#34;code-variable&#34;&gt;regularization-value&lt;/span&gt; ]
              [, compute_mse = &lt;span class=&#34;code-variable&#34;&gt;boolean&lt;/span&gt; ]
        ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view containing the &lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;.
&lt;p&gt;This algorithm expects a stationary time series as input; using a time series with a mean that shifts over time may lead to weaker results.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;data-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;An input column of type NUMERIC that contains the dependent variables or outcomes.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;timestamp-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;One INTEGER, FLOAT, or TIMESTAMP column that represent the timestamp variable. Timesteps must be consistent.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;q&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;INTEGER in the range [1, 67), the number of lags to consider in the computation.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/moving-average/#&#34;&gt;MOVING_AVERAGE&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/ml-algorithms/arima/#&#34;&gt;ARIMA&lt;/a&gt; models use different training techniques that produce distinct models when trained with matching parameter values on the same data. For example, if you train a moving-average model using the same data and &lt;code&gt;q&lt;/code&gt; value as an ARIMA model trained with &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;d&lt;/code&gt; parameters set to zero, those two models will not be identical.

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;missing&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following methods for handling missing values:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;drop&lt;/strong&gt;: Missing values are ignored.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;error&lt;/strong&gt;: Missing values raise an error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;zero&lt;/strong&gt;: Missing values are replaced with 0.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;linear_interpolation&lt;/strong&gt;: Missing values are replaced by linearly interpolated values based on the nearest valid entries before and after the missing value. This means that in cases where the first or last values in a dataset are missing, they will simply be dropped.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; linear_interpolation&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following regularization methods used when fitting the data:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;None&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;L2&lt;/strong&gt;: weight regularization term which penalizes the squared weight value&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; None&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;FLOAT in the range [0, 100000], the regularization value, lambda.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;compute_mse&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;BOOLEAN, whether to calculate and output the mean squared error (MSE).
&lt;p&gt;This parameter only accepts &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot; rather than the standard literal equivalents for BOOLEANs like 1 or 0.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/moving-average-model-example/#&#34;&gt;Moving-average model example&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-moving-average/#&#34;&gt;PREDICT_MOVING_AVERAGE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: NAIVE_BAYES</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/naive-bayes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/naive-bayes/</guid>
      <description>
        
        
        &lt;p&gt;Executes the Naive Bayes algorithm on an input relation and returns a Naive Bayes model.&lt;/p&gt;
&lt;p&gt;Columns are treated according to data type:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;FLOAT: Values are assumed to follow some Gaussian distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;INTEGER: Values are assumed to belong to one multinomial distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CHAR/VARCHAR: Values are assumed to follow some categorical distribution. The string values stored in these columns must not be greater than 128 characters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BOOLEAN: Values are treated as categorical with two values.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NAIVE_BAYES ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;] [, alpha = &lt;span class=&#34;code-variable&#34;&gt;alpha-value&lt;/span&gt;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training data for building the model. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the input column that represents the dependent variable, or outcome. This column must contain discrete labels that represent different class labels.
&lt;p&gt;The response column must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, CHAR/VARCHAR, or BOOLEAN; otherwise the model is invalid.&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

Vertica automatically casts &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; response column values to VARCHAR.

&lt;/div&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;

&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, CHAR/VARCHAR, or BOOLEAN; otherwise the model is invalid. BOOLEAN column values are converted to FLOAT values before training: 0 for false, 1 for true.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float, specifies use of Laplace smoothing if the event model is categorical, multinomial, or Bernoulli.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;colsInfo&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The information from the response and predictor columns used in training:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;index: The index (starting at 0) of the column as provided in training. Index 0 is used for the response column.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;name: The column name.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;type: The label used for response with a value of Gaussian, Multinominal, Categorical, or Bernoulli.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The smooth parameter value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;prior&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The percentage of each class among all training samples:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;label: The class label.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;value: The percentage of each class.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nRowsTotal&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The number of samples accepted for training from the data set.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nRowsRejected&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The number of samples rejected for training.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The SQL statement used to replicate the training.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;Gaussian&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The Gaussian model conditioned on the class indicated by the class_name:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;index: The index of the predictor column.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;mu: The mean value of the model.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;sigmaSq: The squared standard deviation of the model.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;Multinominal&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The Multinomial model conditioned on the class indicated by the class_name:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;index: The index of the predictor column.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;prob: The probability conditioned on the class indicated by the class_name.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;Bernoulli&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The Bernoulli model conditioned on the class indicated by the class_name:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;index: The index of the predictor column.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;probTrue: The probability of having the value TRUE in this predictor column.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;Categorical&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The Gaussian model conditioned on the class indicated by the class_name:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;category: The value in the predictor name.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;lt;class_name&amp;gt;: The probability of having that value conditioned on the class indicated by the class_name.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser, or SELECT privileges on the input relation.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NAIVE_BAYES(&amp;#39;naive_house84_model&amp;#39;, &amp;#39;house84_train&amp;#39;, &amp;#39;party&amp;#39;, &amp;#39;*&amp;#39;
                      USING PARAMETERS exclude_columns=&amp;#39;party, id&amp;#39;);
                                  NAIVE_BAYES
--------------------------------------------------
 Finished. Accepted Rows: 324  Rejected Rows: 0
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/naive-bayes/classifying-data-using-naive-bayes/#&#34;&gt;Classifying data using naive bayes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-naive-bayes/#&#34;&gt;PREDICT_NAIVE_BAYES&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-naive-bayes-classes/#&#34;&gt;PREDICT_NAIVE_BAYES_CLASSES&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: PLS_REG</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/pls-reg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/pls-reg/</guid>
      <description>
        
        
        &lt;p&gt;Executes the Partial Least Squares (PLS) regression algorithm on an input relation, and returns a PLS regression model.&lt;/p&gt;
&lt;p&gt;Combining aspects of &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/data-preparation/pca-principal-component-analysis/#&#34;&gt;PCA (principal component analysis)&lt;/a&gt; and &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/linear-regression/&#34;&gt;linear regression&lt;/a&gt;, the PLS regression algorithm extracts a set of latent components that explain as much covariance as possible between the predictor and response variables, and then performs a regression that predicts response values using the extracted components.&lt;/p&gt;
&lt;p&gt;This technique is particularly useful when the number of predictor variables is greater than the number of observations or the predictor variables are highly collinear. If either of these conditions is true of the input relation, ordinary linear regression fails to converge to an accurate model.&lt;/p&gt;

&lt;p&gt;The PLS_REG function supports PLS regression with only one response column, often referred to as PLS1. PLS regression with multiple response columns, known as PLS2, is not currently supported.&lt;/p&gt;
&lt;p&gt;To make predictions with a PLS model, use the &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-pls-reg/#&#34;&gt;PREDICT_PLS_REG&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;PLS_REG ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;param&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Table or view that contains the training data.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the input column that represents the dependent variable or outcome. All values in this column must be &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;
&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN; otherwise the model is invalid.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

All BOOLEAN predictor values are converted to FLOAT values before training: 0 for false, 1 for true. No type checking occurs during prediction, so you can use a BOOLEAN predictor column in training, and during prediction provide a FLOAT column of the same name. In this case, all FLOAT values must be either 0 or 1.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;num_components&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of components in the model. The value must be an integer in the range [1, min(N, P)], where N is the number of rows in &lt;code&gt;input-relation&lt;/code&gt; and P is the number of columns in &lt;code&gt;predictor-columns&lt;/code&gt;.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 2&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;scale&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean, whether to standardize the response and predictor columns.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; True&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;details&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Information about the model coefficients, including:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;coeffNames&lt;/code&gt;: Name of the coefficients, starting with the intercept and following with the names of the predictors in the same order specified in the call.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;coeff&lt;/code&gt;: Vector of estimated coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;responses&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the response column.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;call_string&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;SQL statement used to train the model.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;Additional Info&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Additional information about the model, including:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;is_scaled&lt;/code&gt;: Whether the input columns were scaled before model training.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;n_components&lt;/code&gt;: Number of components in the model.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rejected_row_count&lt;/code&gt;: Number of rows in &lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt; that were rejected because they contained an invalid value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;accepted_row_count&lt;/code&gt;: Number of rows in &lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt; accepted for training the model.&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Non-superusers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CREATE privileges on the schema where the model is created&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SELECT privileges on the input relation&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example trains a PLS regression model with the default number of components:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pls_data&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x3&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x4&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x5&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;COPY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pls_data&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;STDIN&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;8&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PLS_REG&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;pls_model&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;pls_data&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;y&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;x1,x2&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WARNING&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;There&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;are&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;not&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;more&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;than&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;meaningful&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;component&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                        &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PLS_REG&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;                           
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;Number&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;components&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Accepted&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Rejected&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;Rows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For an in-depth example that trains and makes predictions with a PLS model, see &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/pls-reg-example/#&#34;&gt;PLS regression&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-pls-reg/#&#34;&gt;PREDICT_PLS_REG&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/pls-reg-example/#&#34;&gt;PLS regression&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: POISSON_REG</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/poisson-reg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/poisson-reg/</guid>
      <description>
        
        
        &lt;p&gt;Executes Poisson regression on an input relation, and returns a Poisson regression model.&lt;/p&gt;
&lt;p&gt;You can export the resulting Poisson regression model in VERTICA_MODELS or PMML format to apply it on data outside OpenText™ Analytics Database. You can also train a Poisson regression model elsewhere, then import it to the database in PMML format to apply it on data inside the database.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;POISSON_REG ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-table&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, optimizer = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;optimizer-method&lt;/span&gt;&amp;#39;]
              [, regularization = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;regularization-method&lt;/span&gt;&amp;#39;]
              [, epsilon = &lt;span class=&#34;code-variable&#34;&gt;epsilon-value&lt;/span&gt;]
              [, max_iterations = &lt;span class=&#34;code-variable&#34;&gt;iterations&lt;/span&gt;]
              [, lambda = &lt;span class=&#34;code-variable&#34;&gt;lamda-value&lt;/span&gt;]
              [, fit_intercept = &lt;span class=&#34;code-variable&#34;&gt;boolean-value&lt;/span&gt;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Table or view that contains the training data for building the model. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Name of input column that represents the dependent variable or outcome. All values in this column must be &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, otherwise the model is invalid.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;
&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN; otherwise the model is invalid.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

All BOOLEAN predictor values are converted to FLOAT values before training: 0 for false, 1 for true. No type checking occurs during prediction, so you can use a BOOLEAN predictor column in training, and during prediction provide a FLOAT column of the same name. In this case, all FLOAT values must be either 0 or 1.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;optimizer&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Optimizer method used to train the model. The currently supported method is 
&lt;code&gt;&lt;a href=&#34;https://link.springer.com/chapter/10.1007/978-3-319-18032-8_54&#34;&gt;Newton&lt;/a&gt;&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Method of regularization, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;None&lt;/code&gt; (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;L2&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;FLOAT in the range (0.0, 1.0), the error value at which to stop training. Training stops if either the relative change in Poisson deviance is less than or equal to epsilon or if the number of iterations exceeds &lt;code&gt;max_iterations&lt;/code&gt;.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-6&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;INTEGER in the range (0, 1000000), the maximum number of training iterations. Training stops if either the number of iterations exceeds &lt;code&gt;max_iterations&lt;/code&gt; or the relative change in Poisson deviance is less than or equal to epsilon.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;FLOAT ≥ 0, specifies the &lt;code&gt;regularization&lt;/code&gt; strength.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;fit_intercept&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean, specifies whether the model includes an intercept. By setting to false, no intercept will be used in training the model.”
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; True&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;data&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Data for the function, including:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coeffNames&lt;/code&gt;: Name of the coefficients. This starts with intercept and then follows with the names of the predictors in the same order specified in the call.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coeff&lt;/code&gt;: Vector of estimated coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;stdErr&lt;/code&gt;: Vector of the standard error of the coefficients, with the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;zValue&lt;/code&gt;: (for logistic and Poisson regression): Vector of z-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;tValue&lt;/code&gt; (for linear regression): Vector of t-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;pValue&lt;/code&gt;: Vector of p-values of the coefficients, in the same order as &lt;code&gt;coeffNames&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;regularization&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Type of regularization to use when training the model.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Regularization parameter. Higher values enforce stronger regularization. This value must be nonnegative.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of iterations that actually occur for the convergence before exceeding &lt;code&gt;max_iterations&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;skippedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of rows of the input relation that were skipped because they contained an invalid value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;processedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Total number of input relation rows minus &lt;code&gt;skippedRows&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Value of all input arguments specified when the function was called.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT POISSON_REG(&amp;#39;myModel&amp;#39;, &amp;#39;numericFaithful&amp;#39;, &amp;#39;eruptions&amp;#39;, &amp;#39;waiting&amp;#39; USING PARAMETERS epsilon=1e-8);
poisson_reg
---------------------------
Finished in 7 iterations

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/linear-regression/building-linear-regression-model/#&#34;&gt;Building a linear regression model&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-linear-reg/#&#34;&gt;PREDICT_LINEAR_REG&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-pmml/#&#34;&gt;PREDICT_PMML&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/import-models/#&#34;&gt;IMPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: RF_CLASSIFIER</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/rf-classifier/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/rf-classifier/</guid>
      <description>
        
        
        &lt;p&gt;Trains a random forest model for classification on an input relation.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RF_CLASSIFIER ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, ntree = &lt;span class=&#34;code-variable&#34;&gt;num-trees&lt;/span&gt;]
              [, mtry = &lt;span class=&#34;code-variable&#34;&gt;num-features&lt;/span&gt;]
              [, sampling_size = &lt;span class=&#34;code-variable&#34;&gt;sampling-size&lt;/span&gt;]
              [, max_depth = &lt;span class=&#34;code-variable&#34;&gt;depth&lt;/span&gt;]
              [, max_breadth = &lt;span class=&#34;code-variable&#34;&gt;breadth&lt;/span&gt;]
              [, min_leaf_size = &lt;span class=&#34;code-variable&#34;&gt;leaf-size&lt;/span&gt;]
              [, min_info_gain =&lt;span class=&#34;code-variable&#34;&gt; threshold&lt;/span&gt;]
              [, nbins = &lt;span class=&#34;code-variable&#34;&gt;num-bins&lt;/span&gt;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model stored as a result of the training, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training samples. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;An input column of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, CHAR/VARCHAR, or BOOLEAN that represents the dependent variable.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

Vertica automatically casts &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; response column values to VARCHAR.

&lt;/div&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;

&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, CHAR/VARCHAR, or BOOLEAN; otherwise the model is invalid.&lt;/p&gt;
&lt;p&gt;Vertica XGBoost and Random Forest algorithms offer native support for categorical columns (BOOL/VARCHAR). Simply pass the categorical columns as predictors to the models and the algorithm will automatically treat the columns as categorical and will not attempt to split them into bins in the same manner as numerical columns; Vertica treats these columns as true categorical values and does not simply cast them to continuous values under-the-hood.&lt;/p&gt;

&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of column names from &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ntree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 1000], the number of trees in the forest.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 20&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;mtry&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1, &lt;em&gt;&lt;code&gt;number-predictors&lt;/code&gt;&lt;/em&gt;], the number of randomly chosen features from which to pick the best feature to split on a given tree node.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; Square root of the total number of predictors&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;sampling_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Float in the range (0.0, 1.0], the portion of the input data set that is randomly picked for training each tree.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.632&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_depth&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 100], the maximum depth for growing each tree. For example, a &lt;code&gt;max_depth&lt;/code&gt; of 0 represents a tree with only a root node, and a &lt;code&gt;max_depth&lt;/code&gt; of 2 represents a tree with four leaf nodes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 5&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_breadth&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 1e9], the maximum number of leaf nodes a tree can have.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 32&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_leaf_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 1e6], the minimum number of samples each branch must have after splitting a node. A split that results in fewer remaining samples in its left or right branch is be discarded, and the node is treated as a leaf node.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_info_gain&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Float in the range [0.0, 1.0), the minimum threshold for including a split. A split with information gain less than this threshold is discarded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nbins&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [2, 1000], the number of bins to use for discretizing continuous features.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 32&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;data&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Data for the function, including:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;predictorNames&lt;/code&gt;: The name of the predictors in the same order they were specified for training the model.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;predictorTypes&lt;/code&gt;: The type of the predictors in the same order as their names in predictorNames.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ntree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of trees in the model.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;skippedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of rows in &lt;code&gt;input_relation&lt;/code&gt; that were skipped because they contained an invalid value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;processedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Total number of rows in &lt;code&gt;input_relation&lt;/code&gt; minus &lt;code&gt;skippedRows&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Value of all input arguments that were specified at the time the function was called.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT RF_CLASSIFIER (&amp;#39;myRFModel&amp;#39;, &amp;#39;iris&amp;#39;, &amp;#39;Species&amp;#39;, &amp;#39;Sepal_Length, Sepal_Width,
Petal_Length, Petal_Width&amp;#39; USING PARAMETERS ntree=100, sampling_size=0.3);

RF_CLASSIFIER
--------------------------------------------------
Finished training
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/random-forest-classification/classifying-data-using-random-forest/#&#34;&gt;Classifying data using random forest&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-rf-classifier/#&#34;&gt;PREDICT_RF_CLASSIFIER&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-rf-classifier-classes/#&#34;&gt;PREDICT_RF_CLASSIFIER_CLASSES&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: RF_REGRESSOR</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/rf-regressor/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/rf-regressor/</guid>
      <description>
        
        
        &lt;p&gt;Trains a random forest model for regression on an input relation.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RF_REGRESSOR ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, ntree = &lt;span class=&#34;code-variable&#34;&gt;num-trees&lt;/span&gt;]
              [, mtry = &lt;span class=&#34;code-variable&#34;&gt;num-features&lt;/span&gt;]
              [, sampling_size = &lt;span class=&#34;code-variable&#34;&gt;sampling-size&lt;/span&gt;]
              [, max_depth = &lt;span class=&#34;code-variable&#34;&gt;depth&lt;/span&gt;]
              [, max_breadth = &lt;span class=&#34;code-variable&#34;&gt;breadth&lt;/span&gt;]
              [, min_leaf_size = &lt;span class=&#34;code-variable&#34;&gt;leaf-size&lt;/span&gt;]
              [, min_info_gain = &lt;span class=&#34;code-variable&#34;&gt;threshold&lt;/span&gt;]
              [, nbins = &lt;span class=&#34;code-variable&#34;&gt;num-bins&lt;/span&gt;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The model that is stored as a result of training, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training samples. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; input column that represents the dependent variable.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;

&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt;, CHAR/VARCHAR, or BOOLEAN; otherwise the model is invalid.&lt;/p&gt;
&lt;p&gt;Vertica XGBoost and Random Forest algorithms offer native support for categorical columns (BOOL/VARCHAR). Simply pass the categorical columns as predictors to the models and the algorithm will automatically treat the columns as categorical and will not attempt to split them into bins in the same manner as numerical columns; Vertica treats these columns as true categorical values and does not simply cast them to continuous values under-the-hood.&lt;/p&gt;

&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ntree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 1000], the number of trees in the forest.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 20&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;mtry&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1, &lt;em&gt;&lt;code&gt;number-predictors&lt;/code&gt;&lt;/em&gt;], the number of features to consider at the split of a tree node.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; One-third the total number of predictors&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;sampling_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Float in the range (0.0, 1.0], the portion of the input data set that is randomly picked for training each tree.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.632&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_depth&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 100], the maximum depth for growing each tree. For example, a &lt;code&gt;max_depth&lt;/code&gt; of 0 represents a tree with only a root node, and a &lt;code&gt;max_depth&lt;/code&gt; of 2 represents a tree with four leaf nodes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 5&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_breadth&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [1, 1e9], the maximum number of leaf nodes a tree can have.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 32&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_leaf_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1, 1e6], the minimum number of samples each branch must have after splitting a node. A split that results in fewer remaining samples in its left or right branch is be discarded, and the node is treated as a leaf node.
&lt;p&gt;The default value of this parameter differs from that of analogous parameters in libraries like &lt;a href=&#34;https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html&#34;&gt;sklearn&lt;/a&gt; and will therefore yield a model with predicted values that differ from the original response values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 5&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_info_gain&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Float in the range [0.0, 1.0), the minimum threshold for including a split. A split with information gain less than this threshold is discarded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nbins&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Integer in the range [2, 1000], the number of bins to use for discretizing continuous features.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 32&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;data&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Data for the function, including:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;predictorNames&lt;/code&gt;: The name of the predictors in the same order they were specified for training the model.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;predictorTypes&lt;/code&gt;: The type of the predictors in the same order as their names in predictorNames.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ntree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of trees in the model.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;skippedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of rows in &lt;code&gt;input_relation&lt;/code&gt; that were skipped because they contained an invalid value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;processedRows&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Total number of rows in &lt;code&gt;input_relation&lt;/code&gt; minus &lt;code&gt;skippedRows&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Value of all input arguments that were specified at the time the function was called.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT RF_REGRESSOR (&amp;#39;myRFRegressorModel&amp;#39;, &amp;#39;mtcars&amp;#39;, &amp;#39;carb&amp;#39;, &amp;#39;mpg, cyl, hp, drat, wt&amp;#39; USING PARAMETERS
ntree=100, sampling_size=0.3);
RF_REGRESSOR
--------------
Finished
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/building-random-forest-regression-model/#&#34;&gt;Building a random forest regression model&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-rf-regressor/#&#34;&gt;PREDICT_RF_REGRESSOR&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SVM_CLASSIFIER</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/svm-classifier/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/svm-classifier/</guid>
      <description>
        
        
        &lt;p&gt;Trains the SVM model on an input relation.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SVM_CLASSIFIER ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, C = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;cost&lt;/span&gt;&amp;#39;]
              [, epsilon = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;epsilon-value&lt;/span&gt;&amp;#39;]
              [, max_iterations = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;max-iterations&lt;/span&gt;&amp;#39;]
              [, class_weights = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;weight&lt;/span&gt;&amp;#39;]
              [, intercept_mode = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;intercept-mode&lt;/span&gt;&amp;#39;]
              [, intercept_scaling = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;scale&lt;/span&gt;&amp;#39;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training data. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The input column that represents the dependent variable or outcome. The column value must be 0 or 1, and of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN, otherwise the function returns with an error.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;
&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN; otherwise the model is invalid.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

All BOOLEAN predictor values are converted to FLOAT values before training: 0 for false, 1 for true. No type checking occurs during prediction, so you can use a BOOLEAN predictor column in training, and during prediction provide a FLOAT column of the same name. In this case, all FLOAT values must be either 0 or 1.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;C&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Weight for misclassification cost. The algorithm minimizes the regularization cost and the misclassification cost.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Used to control accuracy.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-3&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Maximum number of iterations that the algorithm performs.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 100&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;class_weights&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to determine weights of the two classes, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;None&lt;/code&gt; (default): No weights are used&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;value0&lt;/code&gt;&lt;/em&gt;, &lt;em&gt;&lt;code&gt;value1&lt;/code&gt;&lt;/em&gt;: Two comma-delimited strings that specify two positive FLOAT values, where &lt;em&gt;&lt;code&gt;value0&lt;/code&gt;&lt;/em&gt; assigns a weight to class 0, and &lt;em&gt;&lt;code&gt;value1&lt;/code&gt;&lt;/em&gt; assigns a weight to class 1.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;auto&lt;/code&gt;: Weights each class according to the number of samples.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;intercept_mode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to treat the intercept, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;regularized&lt;/code&gt; (default): Fits the intercept and applies a regularization on it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;unregularized&lt;/code&gt;: Fits the intercept but does not include it in regularization.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;intercept_scaling&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float value that serves as the value of a dummy feature whose coefficient OpenText™ Analytics Database uses to calculate the model intercept. Because the dummy feature is not in the training data, its values are set to a constant, by default 1.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;coeff&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Coefficients in the model:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;colNames&lt;/code&gt;: Intercept, or predictor column name&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coefficients&lt;/code&gt;: Coefficient value&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nAccepted&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of samples accepted for training from the data set&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nRejected&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of samples rejected when training&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nIteration&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of iterations used in training&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;SQL statement used to replicate the training&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example uses &lt;code&gt;SVM_CLASSIFIER&lt;/code&gt; on the &lt;code&gt;mtcars&lt;/code&gt; table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT SVM_CLASSIFIER(
       &amp;#39;mySvmClassModel&amp;#39;, &amp;#39;mtcars&amp;#39;, &amp;#39;am&amp;#39;, &amp;#39;mpg,cyl,disp,hp,drat,wt,qsec,vs,gear,carb&amp;#39;
       USING PARAMETERS exclude_columns = &amp;#39;hp,drat&amp;#39;);
SVM_CLASSIFIER
----------------------------------------------------------------
Finished in 15 iterations.
Accepted Rows: 32  Rejected Rows: 0
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/svm-support-vector-machine-classification/classifying-data-using-svm-support-vector-machine/#&#34;&gt;Classifying data using SVM (support vector machine)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/svm-support-vector-machine-classification/#&#34;&gt;SVM (support vector machine) for classification&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-svm-classifier/#&#34;&gt;PREDICT_SVM_CLASSIFIER&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SVM_REGRESSOR</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/svm-regressor/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/svm-regressor/</guid>
      <description>
        
        
        &lt;p&gt;Trains the SVM model on an input relation.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SVM_REGRESSOR ( &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS
              [exclude_columns = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;excluded-columns&lt;/span&gt;&amp;#39;]
              [, error_tolerance = &lt;span class=&#34;code-variable&#34;&gt;error-tolerance&lt;/span&gt;]
              [, C = &lt;span class=&#34;code-variable&#34;&gt;cost&lt;/span&gt;]
              [, epsilon = &lt;span class=&#34;code-variable&#34;&gt;epsilon-value&lt;/span&gt;]
              [, max_iterations = &lt;span class=&#34;code-variable&#34;&gt;max-iterations&lt;/span&gt;]
              [, intercept_mode = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;mode&lt;/span&gt;&amp;#39;]
              [, intercept_scaling = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;scale&lt;/span&gt;&amp;#39;] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Identifies the model to create, where &lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt; conforms to conventions described in &lt;a href=&#34;../../../../../en/sql-reference/language-elements/identifiers/#&#34;&gt;Identifiers&lt;/a&gt;. It must also be unique among all names of sequences, tables, projections, views, and models within the same schema.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training data. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;An input column that represents the dependent variable or outcome. The column must be a &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; data type.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of columns in the input relation that represent independent variables for the model, or asterisk (*) to select all columns. If you select all columns, the argument list for parameter &lt;code&gt;exclude_columns&lt;/code&gt; must include &lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;, and any columns that are invalid as predictor columns.&lt;/p&gt;
&lt;p&gt;All predictor columns must be of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/numeric-data-types/&#34;&gt;numeric&lt;/a&gt; or BOOLEAN; otherwise the model is invalid.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

All BOOLEAN predictor values are converted to FLOAT values before training: 0 for false, 1 for true. No type checking occurs during prediction, so you can use a BOOLEAN predictor column in training, and during prediction provide a FLOAT column of the same name. In this case, all FLOAT values must be either 0 or 1.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns from &lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;error_tolerance&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Defines the acceptable error margin. Any data points outside this region add a penalty to the cost function.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;C&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The weight for misclassification cost. The algorithm minimizes the regularization cost and the misclassification cost.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;epsilon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Used to control accuracy.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1e-3&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_iterations&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The maximum number of iterations that the algorithm performs.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 100&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;intercept_mode&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A string that specifies how to treat the intercept, one of the following
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;regularized&lt;/code&gt; (default): Fits the intercept and applies a regularization on it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;unregularized&lt;/code&gt;: Fits the intercept but does not include it in regularization.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;intercept_scaling&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A FLOAT value, serves as the value of a dummy feature whose coefficient OpenText™ Analytics Database uses to calculate the model intercept. Because the dummy feature is not in the training data, its values are set to a constant, by default set to 1.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;ModelAttributes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;model-attributes&#34;&gt;Model attributes&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;coeff&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Coefficients in the model:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;colNames&lt;/code&gt;: Intercept, or predictor column name&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;coefficients&lt;/code&gt;: Coefficient value&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nAccepted&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of samples accepted for training from the data set&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nRejected&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of samples rejected when training&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nIteration&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of iterations used in training&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;callStr&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;SQL statement used to replicate the training&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT SVM_REGRESSOR(&amp;#39;mySvmRegModel&amp;#39;, &amp;#39;faithful&amp;#39;, &amp;#39;eruptions&amp;#39;, &amp;#39;waiting&amp;#39;
                          USING PARAMETERS error_tolerance=0.1, max_iterations=100);
SVM_REGRESSOR
----------------------------------------------------------------
Finished in 5 iterations.
Accepted Rows: 272  Rejected Rows: 0
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/svm-support-vector-machine-regression/building-an-svm-regression-model/#&#34;&gt;Building an SVM for regression model&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/svm-support-vector-machine-regression/#&#34;&gt;SVM (support vector machine) for regression&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-svm-regressor/#&#34;&gt;PREDICT_SVM_REGRESSOR&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: XGB_CLASSIFIER</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/xgb-classifier/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/xgb-classifier/</guid>
      <description>
        
        
        &lt;p&gt;Trains an XGBoost model for classification on an input relation.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;XGB_CLASSIFIER (&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;param&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Name of the model (case-insensitive).&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training samples. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;An input column of type CHAR or VARCHAR that represents the dependent variable or outcome.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns to use from the input relation, or asterisk (*) to select all columns. Columns must be of data types CHAR, VARCHAR, BOOL, INT, or FLOAT.
&lt;p&gt;Columns of type CHAR, VARCHAR, and BOOL are treated as categorical features; all others are treated as numeric features.&lt;/p&gt;
&lt;p&gt;Vertica XGBoost and Random Forest algorithms offer native support for categorical columns (BOOL/VARCHAR). Simply pass the categorical columns as predictors to the models and the algorithm will automatically treat the columns as categorical and will not attempt to split them into bins in the same manner as numerical columns; Vertica treats these columns as true categorical values and does not simply cast them to continuous values under-the-hood.&lt;/p&gt;

&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of column names from &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_ntree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1,1000] that sets the maximum number of trees to create.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_depth&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1,40] that specifies the maximum depth of each tree.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 6&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;objective&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The objective/loss function used to iteratively improve the model. &#39;crossentropy&#39; is the only option.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;crossentropy&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;split_proposal_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The splitting strategy for the feature columns. &#39;global&#39; is the only option. This method calculates the split for each feature column only at the beginning of the algorithm. The feature columns are split into the number of bins specified by &lt;code&gt;nbins&lt;/code&gt;.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;global&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;learning_rate&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the weight for each tree&#39;s prediction. Setting this parameter can reduce each tree&#39;s impact and thereby prevent earlier trees from monopolizing improvements at the expense of contributions from later trees.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.3&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_split_loss&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range [0,1000] that specifies the minimum amount of improvement each split must achieve on the model&#39;s objective function value to avoid being pruned.
&lt;p&gt;If set to 0 or omitted, no minimum is set. In this case, trees are pruned according to positive or negative objective function values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.0 (disable)&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;weight_reg&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range [0,1000] that specifies the regularization term applied to the weights of classification tree leaves. The higher the setting, the sparser or smoother the weights are, which can help prevent over-fitting.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nbins&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range (1,1000] that specifies the number of bins to use for finding splits in each column. More bins leads to longer runtime but more fine-grained and possibly better splits.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 32&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;sampling_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the fraction of rows to use in each training iteration.
&lt;p&gt;A value of 1 indicates that all rows are used.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;col_sample_by_tree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the fraction of columns (features), chosen at random, to use when building each tree.
&lt;p&gt;A value of 1 indicates that all columns are used.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;col_sample_by&lt;/code&gt; parameters &amp;quot;stack&amp;quot; on top of each other if several are specified. That is, given a set of 24 columns, for &lt;code&gt;col_sample_by_tree=0.5&lt;/code&gt; and&lt;code&gt;col_sample_by_node=0.5&lt;/code&gt;,&lt;code&gt;col_sample_by_tree&lt;/code&gt; samples 12 columns, reducing the available, unsampled column pool to 12. &lt;code&gt;col_sample_by_node&lt;/code&gt; then samples half of the remaining pool, so each node samples 6 columns.&lt;/p&gt;
&lt;p&gt;This algorithm will always sample at least one column.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;col_sample_by_node&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the fraction of columns (features), chosen at random, to use when evaluating each split.
&lt;p&gt;A value of 1 indicates that all columns are used.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;col_sample_by&lt;/code&gt; parameters &amp;quot;stack&amp;quot; on top of each other if several are specified. That is, given a set of 24 columns, for &lt;code&gt;col_sample_by_tree=0.5&lt;/code&gt; and&lt;code&gt;col_sample_by_node=0.5&lt;/code&gt;,&lt;code&gt;col_sample_by_tree&lt;/code&gt; samples 12 columns, reducing the available, unsampled column pool to 12. &lt;code&gt;col_sample_by_node&lt;/code&gt; then samples half of the remaining pool, so each node samples 6 columns.&lt;/p&gt;
&lt;p&gt;This algorithm will always sample at least one column.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/xgboost-classification/#&#34;&gt;XGBoost for classification&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: XGB_REGRESSOR</title>
      <link>/en/sql-reference/functions/ml-functions/ml-algorithms/xgb-regressor/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/ml-functions/ml-algorithms/xgb-regressor/</guid>
      <description>
        
        
        &lt;p&gt;Trains an XGBoost model for regression on an input relation.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;XGB_REGRESSOR (&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;model-name&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;input-relation&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;response-column&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;predictor-columns&lt;/span&gt;&amp;#39;
        [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;param&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Name of the model (case-insensitive).&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;input-relation&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The table or view that contains the training samples. If the input relation is defined in Hive, use 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/hadoop-functions/sync-with-hcatalog-schema/#&#34;&gt;SYNC_WITH_HCATALOG_SCHEMA&lt;/a&gt;&lt;/code&gt; to sync the &lt;code&gt;hcatalog&lt;/code&gt; schema, and then run the machine learning function.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;response-column&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;An input column of type INTEGER or FLOAT that represents the dependent variable or outcome.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;predictor-columns&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Comma-separated list of columns to use from the input relation, or asterisk (*) to select all columns. Columns must be of data types CHAR, VARCHAR, BOOL, INT, or FLOAT.
&lt;p&gt;Columns of type CHAR, VARCHAR, and BOOL are treated as categorical features; all others are treated as numeric features.&lt;/p&gt;
&lt;p&gt;Vertica XGBoost and Random Forest algorithms offer native support for categorical columns (BOOL/VARCHAR). Simply pass the categorical columns as predictors to the models and the algorithm will automatically treat the columns as categorical and will not attempt to split them into bins in the same manner as numerical columns; Vertica treats these columns as true categorical values and does not simply cast them to continuous values under-the-hood.&lt;/p&gt;

&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;exclude_columns&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Comma-separated list of column names from &lt;em&gt;&lt;code&gt;input-columns&lt;/code&gt;&lt;/em&gt; to exclude from processing.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_ntree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1,1000] that sets the maximum number of trees to create.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 10&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_depth&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range [1,40] that specifies the maximum depth of each tree.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 6&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;objective&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The objective/loss function used to iteratively improve the model. &#39;squarederror&#39; is the only option.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;squarederror&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;split_proposal_method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The splitting strategy for the feature columns. &#39;global&#39; is the only option. This method calculates the split for each feature column only at the beginning of the algorithm. The feature columns are split into the number of bins specified by &lt;code&gt;nbins&lt;/code&gt;.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; &#39;global&#39;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;learning_rate&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the weight for each tree&#39;s prediction. Setting this parameter can reduce each tree&#39;s impact and thereby prevent earlier trees from monopolizing improvements at the expense of contributions from later trees.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.3&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;min_split_loss&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range [0,1000] that specifies the minimum amount of improvement each split must achieve on the model&#39;s objective function value to avoid being pruned.
&lt;p&gt;If set to 0 or omitted, no minimum is set. In this case, trees are pruned according to positive or negative objective function values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 0.0 (disable)&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;weight_reg&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range [0,1000] that specifies the regularization term applied to the weights of classification tree leaves. The higher the setting, the sparser or smoother the weights are, which can help prevent over-fitting.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nbins&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Integer in the range (1,1000] that specifies the number of bins to use for finding splits in each column. More bins leads to longer runtime but more fine-grained and possibly better splits.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 32&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;sampling_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the fraction of rows to use in each training iteration.
&lt;p&gt;A value of 1 indicates that all rows are used.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1.0&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;col_sample_by_tree&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the fraction of columns (features), chosen at random, to use when building each tree.
&lt;p&gt;A value of 1 indicates that all columns are used.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;col_sample_by&lt;/code&gt; parameters &amp;quot;stack&amp;quot; on top of each other if several are specified. That is, given a set of 24 columns, for &lt;code&gt;col_sample_by_tree=0.5&lt;/code&gt; and&lt;code&gt;col_sample_by_node=0.5&lt;/code&gt;,&lt;code&gt;col_sample_by_tree&lt;/code&gt; samples 12 columns, reducing the available, unsampled column pool to 12. &lt;code&gt;col_sample_by_node&lt;/code&gt; then samples half of the remaining pool, so each node samples 6 columns.&lt;/p&gt;
&lt;p&gt;This algorithm will always sample at least one column.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;col_sample_by_node&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Float in the range (0,1] that specifies the fraction of columns (features), chosen at random, to use when evaluating each split.
&lt;p&gt;A value of 1 indicates that all columns are used.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;col_sample_by&lt;/code&gt; parameters &amp;quot;stack&amp;quot; on top of each other if several are specified. That is, given a set of 24 columns, for &lt;code&gt;col_sample_by_tree=0.5&lt;/code&gt; and&lt;code&gt;col_sample_by_node=0.5&lt;/code&gt;,&lt;code&gt;col_sample_by_tree&lt;/code&gt; samples 12 columns, reducing the available, unsampled column pool to 12. &lt;code&gt;col_sample_by_node&lt;/code&gt; then samples half of the remaining pool, so each node samples 6 columns.&lt;/p&gt;
&lt;p&gt;This algorithm will always sample at least one column.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; 1&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/xgboost-regression/#&#34;&gt;XGBoost for regression&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
