Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

scikit decision tree

from sklearn import tree
X = [[0, 0], [2, 2]]
y = [0.5, 2.5]
clf = tree.DecisionTreeRegressor()
clf = clf.fit(X, y)
clf.predict([[1, 1]])
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #scikit #decision #tree
ADD COMMENT
Topic
Name
5+1 =