import DecisionTreeClassifier
from sklearn.tree import DecisionTreeClassifier
import DecisionTreeClassifier
from sklearn.tree import DecisionTreeClassifier
scikit decision tree classifier gini criterion
from sklearn.tree import DecisionTreeClassifier
from sklearn import metrics
# Max depth Decision tree classifier using gini criterion
clf_gini_max = DecisionTreeClassifier(random_state=50, criterion='gini', max_depth=None)
clf_gini_max = clf_gini_max.fit(X_train,Y_train)
Y_pred = clf_gini_max.predict(X_test)
training_accuracy = clf_gini_max.score(X_train,Y_train)
testing_accuracy = clf_gini_max.score(X_test,Y_test)
print(training_accuracy)
print(testing_accuracy)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us