Is Random Forest a linear or non linear regression model

0 votes
As decision trees are non linear models so Random Forest should also be nonlinear methods in my opinion. But at some articles i have read otherwise. Can anyone explain how are they nonlinear or not .

or in other words Is Random Forest for linear or non linear data .

If i have a variable A (dependent) and other independent variables B and C and so on . How would RF fit a regression on these variables in the data.
Mar 21, 2022 in Machine Learning by Dev
• 6,000 points
1,375 views

1 answer to this question.

0 votes

RF divides your information into square boxes. The new data point then follows the yes/no responses and ends up in a box. The majority of the classes is the prediction in classification, which counts how many of each class are in each box. When performing regression, the mean of the values in each box is used.

The following equation is used in a regression situation.

y = b0 + x1*b1 + x2*b2 +.. + xn*bn

where xi denotes your characteristic The coefficient to xi is I and "bi." The coefficients of a linear regression are linear, however suppose we have the following regression.

y=x0 +x1*b1 + x2*cos(b2)

Because the coefficient b2 is not linear, this is not a linear regression. To see if it's linear, the derivative of y with respect to bi should be independent of bi for all bi. For example, consider the first (linear) case:

dy/db1 = x1

The first example is independent of b1 (it returns the same result for all dy/dbi), but the second example is not.

# y=x0 +x1*b1 + x2*cos(b2)
 dy/db2 = x2*(-sin(b2))

This is not a linear regression because it is not independent of b2.
As you can see, RF and linear regression are two distinct concepts, and a regression's linearity has nothing to do with RF (or the other way round that matter).

answered Mar 23, 2022 by Nandini
• 5,480 points

Related Questions In Machine Learning

0 votes
1 answer
0 votes
1 answer

Is predicting number of sales a Regression or Classification problem?

The output will be discrete but the ...READ MORE

answered Feb 25, 2022 in Machine Learning by Dev
• 6,000 points
1,295 views
0 votes
1 answer

What is rolling linear regression?

Rolling regression is the analysis of changing ...READ MORE

answered May 23, 2019 in Machine Learning by Jinu
2,084 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What is LassoLars? - Linear regression

LassoLars is a lasso model implemented using ...READ MORE

answered May 22, 2019 in Machine Learning by Basu
2,436 views
0 votes
1 answer

How do I create a linear regression model in Weka without training?

Weka is a classification algorithm. This is ...READ MORE

answered Mar 9, 2022 in Machine Learning by Nandini
• 5,480 points
1,392 views
0 votes
1 answer

What is the difference between linear regression and logistic regression?

Hi Dev, to answer your question Linear Regression ...READ MORE

answered Feb 2, 2022 in Machine Learning by Nandini
• 5,480 points
1,179 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP