text_plain_output_1.png
from sklearn.ensemble import RandomForestRegressor

from sklearn.metrics import mean_squared_error

def train_the_model(m_d, n, ran):
    model = RandomForestRegressor(max_depth=m_d, n_estimators=n, random_state=ran, n_jobs=-1)
    return model

ran = 0
n = 1100
m_d = 500
model = train_the_model(m_d, n, ran)
predict_0 = model.predict(X_val)
print(' MSE: ', mean_squared_error(y_val, predict_0, squared=False))