I need to have multiple confusion matrix at a different threshold for a binary classifier.
I have look up everywhere but could not find an easy implementation for this.
Can anyone provide a way to set the scikit-learn's confusion matrix threshold?
I understand scikit-learn's confusion_matrix uses 0.5 as threshold.
model = LogisticRegression(random_state=0).fit(X_train, y_train)
y_pred = model.predict(X_test)
confusion_matrix(y_test, y_pred)
Output: array([[24705, 8],
[ 718, 0]])
Thanks!