Fix confusion matrices labeling in skills/classification/guide.ipynb #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the confusion matrices in the classification guide notebook. I noticed in going through the notebook that all the confusion matrices do not match the tabular results from each classification report (precision, recall, etc.). This can be easily seen in the original (current online version) by comparing the rows of the classification report to the rows of the confusion matrix. The values are correct in the classification report but not the confusion matrix in each case just based on label order (the rows/cols are just mislabeled). The fix was simple: in the
evaluate
function, I pass the labels toclassification_report
and toconfusion_matrix
to make sure there is consistency. I then re-ran the output for all cells with confusion matrices to have them show correctly.