Skip to content

Files

Latest commit

e791d8b · Jul 24, 2019

History

History

Random Forest Regression - Boston Dataset

This repo is contains source code for Random Forest Regression using Python. In this example i have used the boston dataset.

Explanation for this project.

https://ampersandacademy.com/tutorials/python-data-science/random-forest-regression-using-python-sklearn-from-scratch

I tried various tree size and given result below.

Boston Dataset

https://archive.ics.uci.edu/ml/machine-learning-databases/housing/

Better RMSE Value

When the n_estimators is 40, it gives the better RMSE value.

Result for n_estimators=40

Mean Absolute Error: 2.52090551181

Mean Squared Error: 15.0942913386

Root Mean Squared Error: 3.88513723549

Result using various n_estimators

Result for n_estimators=50

Mean Absolute Error: 2.55118110236

Mean Squared Error: 15.7084229921

Root Mean Squared Error: 3.96338529443

Result for n_estimators=40

Mean Absolute Error: 2.52090551181

Mean Squared Error: 15.0942913386

Root Mean Squared Error: 3.88513723549

Result for n_estimators=30

Mean Absolute Error: 2.54162729659

Mean Squared Error: 15.5711529309

Root Mean Squared Error: 3.94603002154

Result for n_estimators=60

Mean Absolute Error: 2.55049868766

Mean Squared Error: 15.9157054243

Root Mean Squared Error: 3.98944926328

Result for n_estimators=100

Mean Absolute Error: 2.55906299213
Mean Squared Error: 16.7221060866
Root Mean Squared Error: 4.0892671821