Created
October 7, 2022 11:17
-
-
Save JustinGuese/34041d4b5198570138fcdac3d428c99e to your computer and use it in GitHub Desktop.
decision tree example for medium post
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 metrics, DecisionTreeClassifier | |
X, Y = df.drop(["signal"], axis=1), df["signal"] | |
clf = DecisionTreeClassifier() | |
clf.fit(X, Y) | |
preds = clf.predict(X) | |
print(metrics.classification_report(Y, preds)) | |
print(metrics.confusion_matrix(Y, preds)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment