text_plain_output_1.png
from sklearn.ensemble import RandomForestRegressor

from sklearn.metrics import mean_squared_log_error, r2_score

from sklearn.metrics import r2_score

(X_train.shape, X_test.shape, y_train.shape, y_test.shape)

from sklearn.ensemble import RandomForestRegressor
reg = RandomForestRegressor(n_estimators=200)
reg.fit(X_train, y_train)

y_pred_reg = reg.predict(X_test)

from sklearn.metrics import mean_squared_log_error, r2_score
print('Mean Squared Log Error', mean_squared_log_error(y_test, y_pred_reg))
print('R2 Score', r2_score(y_test, y_pred_reg))