In [ ]:
from sklearn import tree
In [ ]:
X = [[0, 0], [1, 1]]
Y = [0, 1]
clf = tree.DecisionTreeClassifier()
clf = clf.fit(X, Y)
In [ ]:
clf.predict([[2., 2.]])
In [ ]:
clf.predict_proba([[2., 2.]])
In [ ]:
X = [[0, 0], [2, 2]]
y = [0.5, 2.5]
clf = tree.DecisionTreeRegressor()
clf = clf.fit(X, y)
clf.predict([[1, 1]])