We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think there is a small mistake in the code while calling the function for plot_confusion_matrix(y_preds, y_true, labels)
plot_confusion_matrix(y_preds, y_true, labels)
The problem arises in chapter:
from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix def plot_confusion_matrix(y_preds, y_true, labels): cm = confusion_matrix(y_true, y_preds, normalize="true") fig, ax = plt.subplots(figsize=(6, 6)) disp = ConfusionMatrixDisplay(confusion_matrix=cm, display_labels=labels) disp.plot(cmap="Blues", values_format=".2f", ax=ax, colorbar=False) plt.title("Normalized confusion matrix") plt.show()
Here is the next line that, I think, contains the mistake, where you call the function:
plot_confusion_matrix(df_tokens["labels"], df_tokens["predicted_label"], tags.names)
As you can you, while calling the function, you pass the true labels as predicted and predicted as true.
I think the intended usage is as follows:
plot_confusion_matrix(df_tokens["predicted_label"], df_tokens["labels"] tags.names)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Information
I think there is a small mistake in the code while calling the function for
plot_confusion_matrix(y_preds, y_true, labels)
The problem arises in chapter:
Describe the bug
Here is the next line that, I think, contains the mistake, where you call the function:
As you can you, while calling the function, you pass the true labels as predicted and predicted as true.
Expected behavior
I think the intended usage is as follows:
The text was updated successfully, but these errors were encountered: