import sklearn.model_selection as model_selection
X_train,X_test,y_train,y_test=model_selection.train_test_split(X,y,
test_size=0.2,random_state = 200)
import sklearn.tree as tree
clf=tree.DecisionTreeClassifier(max_depth=3,random_state=200)
clf.fit(X_train,y_train)
clf.score(X_test,y_test)
import sklearn.metrics as metrics
metrics.roc_auc_score(y_test,clf.predict_proba(X_test)[:,1])
import pydotplus
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
os.chdir(data_dir)
Я хотел бы знать, что делает код.
- metrics.roc_auc_score (y_test, clf.predict_proba (X_test) [:, 1])
- os.environ ["PATH"] + = os.pathsep + 'C: / Program Files (x86) /Graphviz2.38/bin /'