<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Random forest for regression</title>
    <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/</link>
    <description>Recent content in Random forest for regression on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Data-Analysis: Building a random forest regression model</title>
      <link>/en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/building-random-forest-regression-model/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/regression-algorithms/random-forest-regression/building-random-forest-regression-model/</guid>
      <description>
        
        
        &lt;p&gt;This example uses the &amp;quot;mtcars&amp;quot; dataset to create a random forest model to predict the value of &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/rf-regressor/#&#34;&gt;RF_REGRESSOR&lt;/a&gt;&lt;/code&gt; to create the random forest model &lt;code&gt;myRFRegressorModel&lt;/code&gt; using the &lt;code&gt;mtcars&lt;/code&gt; training data. View the summary output 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 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)


=&amp;gt; SELECT GET_MODEL_SUMMARY(USING PARAMETERS model_name=&amp;#39;myRFRegressorModel&amp;#39;);
--------------------------------------------------------------------------------
===========
call_string
===========
SELECT rf_regressor(&amp;#39;public.myRFRegressorModel&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;, ntree=100, mtry=1, sampling_size=0.3, max_depth=5, max_breadth=32,
min_leaf_size=5, min_info_gain=0, nbins=32);

=======
details
=======
predictor|type
---------+-----
mpg      |float
cyl      | int
hp       | int
drat     |float
wt       |float
===============
Additional Info
===============
Name              |Value
------------------+-----
tree_count        | 100
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-rf-regressor/#&#34;&gt;PREDICT_RF_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 PREDICT_RF_REGRESSOR (mpg,cyl,hp,drat,wt
USING PARAMETERS model_name=&amp;#39;myRFRegressorModel&amp;#39;) FROM mtcars;
PREDICT_RF_REGRESSOR
----------------------
2.94774203574204
2.6954087024087
2.6954087024087
2.89906346431346
2.97688489288489
2.97688489288489
2.7086587024087
2.92078965478965
2.97688489288489
2.7086587024087
2.95621822621823
2.82255155955156
2.7086587024087
2.7086587024087
2.85650394050394
2.85650394050394
2.97688489288489
2.95621822621823
2.6954087024087
2.6954087024087
2.84493251193251
2.97688489288489
2.97688489288489
2.8856467976468
2.6954087024087
2.92078965478965
2.97688489288489
2.97688489288489
2.7934087024087
2.7934087024087
2.7086587024087
2.72469441669442
(32 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

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