Last active
March 18, 2021 02:48
-
-
Save adhadse/73656d9a334ecacbea59c917770281c0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.model_selection import cross_val_predict | |
from sklearn.metrics import precision_recall_curve | |
# First you need to get the precisions, recalls, thresholds for your classifier. | |
y_scores = cross_val_predict(classifier, X_train, y_train, cv=3, method='decision_function') | |
precisions, recalls, thresholds = precision_recall_curve(y_train, y_scores) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment