# determination tree classification
from sklearn.datasets import load_iris
from sklearn.model_selection import cross_val_score
from sklearn.tree import DecisionTreeClassifierclf = DecisionTreeClassifier(random_state=0)
iris = load_iris()
cross_val_score(clf, iris.knowledge, iris.goal, cv=10)
# determination tree regression
from sklearn.datasets import load_diabetes
from sklearn.model_selection import cross_val_score
from sklearn.tree import DecisionTreeRegressorX, y = load_diabetes(return_X_y=True)
regressor = DecisionTreeRegressor(random_state=0)
cross_val_score(regressor, X, y, cv=10)