text_plain_output_1.png
from sklearn.metrics import explained_variance_score, r2_score

from sklearn.tree import DecisionTreeRegressor

from sklearn.tree import DecisionTreeRegressor
tree = DecisionTreeRegressor(splitter='random', max_depth=20, max_features='sqrt')
tree.fit(X_train, y_train)
tree_pred = tree.predict(X_test)
print(explained_variance_score(tree_pred, y_test), r2_score(y_test, tree_pred))