# Load libraries
from sklearn.ensemble import RandomForestRegressor
from sklearn import datasets

"""
Explanation: Title: Random Forest Regression
Slug: random_forest_regression
Summary: Training a random forest regressor in scikit-learn.
Date: 2017-09-21 12:00
Category: Machine Learning
Tags: Trees And Forests
Authors: Chris Albon  
Preliminaries
End of explanation
"""


# Load data with only two features
boston = datasets.load_boston()
X = boston.data[:,0:2]
y = boston.target

"""
Explanation: Load Boston Housing Data
End of explanation
"""


# Create decision tree classifer object
regr = RandomForestRegressor(random_state=0, n_jobs=-1)

"""
Explanation: Create Random Forest Regressor
End of explanation
"""


# Train model
model = regr.fit(X, y)

"""
Explanation: Train Random Forest Regressor
End of explanation
"""


