Created
December 17, 2016 18:56
-
-
Save krunal3kapadiya/d084717f31eb200b8b50e4f4e21ac66d to your computer and use it in GitHub Desktop.
Gist contains decision tree classifiers example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn import tree | |
features=[[140,1],[130,1],[150,0],[170,0]] | |
labels=[0,0,1,1] | |
clf=tree.DecisionTreeClassifier() | |
clf=clf.fit(features,labels) | |
print clf.predict([[150,0]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment