<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vertica Documentation – Regression algorithms</title>
    <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/</link>
    <description>Recent content in Regression algorithms on Vertica Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/data-analysis/ml-predictive-analytics/regression-algorithms/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Data-Analysis: Autoregression</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/autoregression/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/autoregression/</guid>
      <description>
        
        
        &lt;p&gt;See the &lt;a href=&#34;../../../../en/data-analysis/ml-predictive-analytics/time-series-forecasting/autoregressive-model-example/&#34;&gt;autoregressive model example&lt;/a&gt; under time series models.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Linear regression</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/linear-regression/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/linear-regression/</guid>
      <description>
        
        
        &lt;p&gt;Using linear regression, you can model the linear relationship between independent variables, or features, and a dependent variable, or outcome. You can build linear regression models to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fit a predictive model to a training data set of independent variables and some dependent variable. Doing so allows you to use feature variable values to make predictions on outcomes. For example, you can predict the amount of rain that will fall on a particular day of the year.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Determine the strength of the relationship between an independent variable and some outcome variable. For example, suppose you want to determine the importance of various weather variables on the outcome of how much rain will fall. You can build a linear regression model based on observations of weather patterns and rainfall to find the answer.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unlike &lt;a href=&#34;../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/logistic-regression/&#34;&gt;Logistic regression&lt;/a&gt;, which you use to determine a binary classification outcome, linear regression is primarily used to predict continuous numerical outcomes in linear relationships.&lt;/p&gt;
&lt;p&gt;You can use the following functions to build a linear regression model, view the model, and use the model to make predictions on a set of test data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/linear-reg/&#34;&gt;LINEAR_REG&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/model-management/get-model-summary/&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a complete example of how to use linear regression on a table in Vertica, see &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;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Poisson regression</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/poisson-regression/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/poisson-regression/</guid>
      <description>
        
        
        &lt;p&gt;Using Poisson regression, you can model count data. Poisson regression offers an alternative to linear regression or logistic regression and is useful when the target variable describes event frequency (event count in a fixed interval of time). &lt;a href=&#34;../../../../en/data-analysis/ml-predictive-analytics/regression-algorithms/linear-regression/&#34;&gt;Linear regression&lt;/a&gt; is preferable if you aim to predict continuous numerical outcomes in linear relationships, while &lt;a href=&#34;../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/logistic-regression/&#34;&gt;logistic regression&lt;/a&gt; is used for predicting a binary classification.&lt;/p&gt;
&lt;p&gt;You can use the following functions to build a Poisson regression model, view the model, and use the model to make predictions on a set of test data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/poisson-reg/&#34;&gt;POISSON_REG&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-poisson-reg/&#34;&gt;PREDICT_POISSON_REG&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;

GET_MODEL_SUMMARY
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Random forest for regression</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/</guid>
      <description>
        
        
        &lt;p&gt;The Random Forest for regression algorithm creates an ensemble model of regression trees. Each tree is trained on a randomly selected subset of the training data. The algorithm predicts the value that is the mean prediction of the individual trees.&lt;/p&gt;
&lt;p&gt;You can use the following functions to train the Random Forest model, and use the model to make predictions on a set of test data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;

&lt;code&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;/code&gt;
&lt;/li&gt;
&lt;li&gt;

&lt;code&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;/code&gt;
&lt;/li&gt;
&lt;li&gt;

&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/rf-regressor/&#34;&gt;RF_REGRESSOR&lt;/a&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a complete example of how to use the Random Forest for regression algorithm in Vertica, see &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;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: SVM (support vector machine) for regression</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/svm-support-vector-machine-regression/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/svm-support-vector-machine-regression/</guid>
      <description>
        
        
        &lt;p&gt;Support Vector Machine (SVM) for regression predicts continuous ordered variables based on the training data.&lt;/p&gt;
&lt;p&gt;Unlike &lt;a href=&#34;../../../../en/data-analysis/ml-predictive-analytics/classification-algorithms/logistic-regression/&#34;&gt;Logistic regression&lt;/a&gt;, which you use to determine a binary classification outcome, SVM for regression is primarily used to predict continuous numerical outcomes.&lt;/p&gt;
&lt;p&gt;You can use the following functions to build an SVM for regression model, view the model, and use the model to make predictions on a set of test data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/svm-regressor/&#34;&gt;SVM_REGRESSOR&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;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;
&lt;p&gt;For a complete example of how to use the SVM algorithm in Vertica, see &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;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: XGBoost for regression</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/xgboost-regression/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/xgboost-regression/</guid>
      <description>
        
        
        &lt;p&gt;&lt;a href=&#34;https://machinelearningmastery.com/gentle-introduction-xgboost-applied-machine-learning/&#34;&gt;XGBoost&lt;/a&gt; (eXtreme Gradient Boosting) is a popular supervised-learning algorithm used for regression and classification on large datasets. It uses sequentially-built shallow decision trees to provide accurate results and a highly-scalable training method that avoids overfitting.&lt;/p&gt;

&lt;p&gt;The following XGBoost functions create and perform predictions with a regression model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;

&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/xgb-regressor/&#34;&gt;XGB_REGRESSOR&lt;/a&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;

&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-xgb-regressor/&#34;&gt;PREDICT_XGB_REGRESSOR&lt;/a&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example uses a small data set named &amp;quot;mtcars&amp;quot;, which contains design and performance data for 32 automobiles from 1973-1974, and creates an XGBoost regression model to predict the value of the variable &lt;code&gt;carb&lt;/code&gt; (the number of carburetors).&lt;/p&gt;
Before you begin the example, &lt;a href=&#34;../../../../en/data-analysis/ml-predictive-analytics/download-ml-example-data/&#34;&gt;load the Machine Learning sample data&lt;/a&gt;.
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Use 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/xgb-regressor/&#34;&gt;XGB_REGRESSOR&lt;/a&gt;&lt;/code&gt; to create the XGBoost regression model &lt;code&gt;xgb_cars&lt;/code&gt; from the &lt;code&gt;mtcars&lt;/code&gt; dataset:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT XGB_REGRESSOR (&amp;#39;xgb_cars&amp;#39;, &amp;#39;mtcars&amp;#39;, &amp;#39;carb&amp;#39;, &amp;#39;mpg, cyl, hp, drat, wt&amp;#39;
    USING PARAMETERS learning_rate=0.5);
 XGB_REGRESSOR
---------------
 Finished
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can then view a summary of the model with 
&lt;code&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;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT GET_MODEL_SUMMARY(USING PARAMETERS model_name=&amp;#39;xgb_cars&amp;#39;);
                  GET_MODEL_SUMMARY
------------------------------------------------------
===========
call_string
===========
xgb_regressor(&amp;#39;public.xgb_cars&amp;#39;, &amp;#39;mtcars&amp;#39;, &amp;#39;&amp;#34;carb&amp;#34;&amp;#39;, &amp;#39;mpg, cyl, hp, drat, wt&amp;#39;
USING PARAMETERS exclude_columns=&amp;#39;&amp;#39;, max_ntree=10, max_depth=5, nbins=32, objective=squarederror,
split_proposal_method=global, epsilon=0.001, learning_rate=0.5, min_split_loss=0, weight_reg=0, sampling_size=1)

=======
details
=======
predictor|      type
---------+----------------
   mpg   |float or numeric
   cyl   |      int
   hp    |      int
  drat   |float or numeric
   wt    |float or numeric

===============
Additional Info
===============
       Name       |Value
------------------+-----
    tree_count    | 10
rejected_row_count|  0
accepted_row_count| 32

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-xgb-regressor/&#34;&gt;PREDICT_XGB_REGRESSOR&lt;/a&gt;&lt;/code&gt; to predict the number of carburetors:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT carb, PREDICT_XGB_REGRESSOR (mpg,cyl,hp,drat,wt USING PARAMETERS model_name=&amp;#39;xgb_cars&amp;#39;) FROM mtcars;
 carb | PREDICT_XGB_REGRESSOR
------+-----------------------
    4 |      4.00335213618023
    2 |       2.0038188946536
    6 |      5.98866003194438
    1 |      1.01774386191546
    2 |       1.9959801016274
    2 |       2.0038188946536
    4 |      3.99545403625739
    8 |      7.99211056556231
    2 |      1.99291901733151
    3 |       2.9975688946536
    3 |       2.9975688946536
    1 |      1.00320357711227
    2 |       2.0038188946536
    4 |      3.99545403625739
    4 |      4.00124134679445
    1 |      1.00759516721382
    4 |      3.99700517763435
    4 |      3.99580193056138
    4 |      4.00009088187525
    3 |       2.9975688946536
    2 |      1.98625064560888
    1 |      1.00355294416998
    2 |      2.00666247039502
    1 |      1.01682931210169
    4 |      4.00124134679445
    1 |      1.01007809485918
    2 |      1.98438405824605
    4 |      3.99580193056138
    2 |      1.99291901733151
    4 |      4.00009088187525
    2 |       2.0038188946536
    1 |      1.00759516721382
(32 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

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