Skip to content

Fix typo and document normalize values in confusion_matrix README - #788

Open
RudrenduPaul wants to merge 1 commit into
huggingface:mainfrom
RudrenduPaul:fix/confusion-matrix-readme-typo
Open

Fix typo and document normalize values in confusion_matrix README#788
RudrenduPaul wants to merge 1 commit into
huggingface:mainfrom
RudrenduPaul:fix/confusion-matrix-readme-typo

Conversation

@RudrenduPaul

Copy link
Copy Markdown

Fix typo and document normalize values in confusion_matrix README

Closes #652

What this fixes

In metrics/confusion_matrix/README.md:

  1. Typo in Output Values: "or the number of examples input" is missing
    a word and should read "or the number of examples in the input". The
    same sentence also referenced normalize being set to True, but
    normalize is a string parameter (passed straight through to
    sklearn.metrics.confusion_matrix) and its default is None, not a
    boolean True. Corrected to "if normalize is set to None (default)".

  2. Missing valid values for normalize: The Inputs section described
    what normalize does but never listed the permitted values. Added the
    permitted values 'true', 'pred', 'all', or None (default),
    matching the underlying sklearn.metrics.confusion_matrix implementation
    used by this metric (see metrics/confusion_matrix/confusion_matrix.py,
    which passes normalize straight through to sklearn).

Verification

  • Confirmed against current main that both issues were still present
    before this fix.
  • Change is scoped to the README only; no code or behavior changes.

Note: this documentation fix was prepared with AI assistance (Claude Code)
and reviewed before submission.

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.

Typo in README of confusion_matrix, and suggestion to specify valid values for normalize

1 participant