Skip to content
New issue

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

(Refactored) Guarantee that labels are aligned #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ottobricks
Copy link

Minor addition of keyword argument 'labels' to calling scikit-learn's confusion_matrix will guarantee that classes are correctly aligned with the axes' labels. It fixes the issue of using columns generated in line 216 as indexers for the y_test and predictions sets. Instead, it creates the confusion matrix with labels from the input sets and later reorders the matrix if columns were passed as arguments.

Minor addition of keyword argument 'labels' to calling scikit-learn's confusion_matrix will guarantee that classes are correctly aligned with the axes' labels. It fixes the issue of using columns generated in line 216 as indexers for the y_test and predictions sets. Instead, it creates the confusion matrix with labels from the input sets and later reorders the matrix if columns were passed as arguments.
@ottobricks
Copy link
Author

I apologize for creating yet another PR. This will be the last one concerning this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant