
<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
Sklearn Decision Tree Regressor - Training a Decision Tree Regression Model

<ASSISTANT_TASK:>
Python Code::
from sklearn.tree import DecisionTreeRegressor
from sklearn.metrics import mean_squared_error, mean_absolute_error, max_error, explained_variance_score, mean_absolute_percentage_error
# initialise & fit Decision Tree Regressor
model = DecisionTreeRegressor(criterion='squared_error',
                              max_depth=None,
                              min_samples_split=2,
                              min_samples_leaf=1,
                              random_state=101)
model.fit(X_train, y_train)
# create dictionary that contains feature importance
feature_importance= dict(zip(X_train.columns, model.feature_importances_))
print('Feature Importance',feature_importance)
# make prediction for test data & evaluate performance
y_pred = model.predict(X_test)
print('RMSE:',mean_squared_error(y_test, y_pred, squared = False))
print('MAE:',mean_absolute_error(y_test, y_pred))
print('MAPE:',mean_absolute_percentage_error(y_test, y_pred))
print('Max Error:',max_error(y_test, y_pred))
print('Explained Variance Score:',explained_variance_score(y_test, y_pred))

<END_TASK>
