from sklearn.tree import DecisionTreeClassifier
import numpy as np
X = np.array([[1, 1], [2, 2], [3, 3], [4, 4]])
y = np.array([0, 0, 1, 1])
model = DecisionTreeClassifier(max_depth=1)
model.fit(X, y)
prediction = model.predict([[2.5, 2.5]])
print(prediction[0])
#Python #ML