Elma-dev / Random_forest_and_R_Squared

Random Forest and R squared meaning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random_forest_and_R_Squared

Random Forest and R squared meaning

Random Forest Intuition

step1: Pick at random K data points from the training set.
step2: Build the Decision Tree associated to these K data points.
step3: Choose the number Ntree of trees you want to build and repeat step1 & step2.
step4: For a new data point, make each one of your Ntree tree predict the value of Y to for the data in question, and assign the new data point the average across all of the predict Y values.
image

R squared

$$R^{2}=1-\frac{\sum_{i}(y_{i}-\hat{y_{i}})^2}{\sum_{i}(y_{i}-y_{avg})^2}$$

image image

  • 1.0 = Perfect fit
  • 0.9 = Very good
  • <0.7 = Not great
  • <0.4 = Terrible
  • <0 = Model makes no sense for this data

About

Random Forest and R squared meaning


Languages

Language:Jupyter Notebook 100.0%