Answers for "decision tree classifier sklearn example"

2

decisiontreeclassifier sklearn

from sklearn.tree import DecisionTreeClassifier
Posted by: Guest on May-10-2021
-1

decision tree classifier sklearn

from sklearn.datasets import load_iris
from sklearn.model_selection import cross_val_score
from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier(random_state=0)
iris = load_iris()
cross_val_score(clf, iris.data, iris.target, cv=10)
Posted by: Guest on January-05-2021
0

skit learn decision

import graphviz 
dot_data = tree.export_graphviz(clf, out_file=None) 
graph = graphviz.Source(dot_data) 
graph.render("iris")
Posted by: Guest on June-20-2020

Code answers related to "decision tree classifier sklearn example"

Browse Popular Code Answers by Language