Skip to content

DOC Correct the default value of values_format in plot_confusion_matrix #15981

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions sklearn/metrics/_plot/confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def plot(self, include_values=True, cmap='viridis',

values_format : str, default=None
Format specification for values in confusion matrix. If `None`,
the format specification is '.2f' for a normalized matrix, and
'd' for a unnormalized matrix.
the format specification is '.2g'.

ax : matplotlib axes, default=None
Axes object to plot on. If `None`, a new figure and axes is
Expand Down Expand Up @@ -165,8 +164,7 @@ def plot_confusion_matrix(estimator, X, y_true, labels=None,

values_format : str, default=None
Format specification for values in confusion matrix. If `None`,
the format specification is '.2f' for a normalized matrix, and
'd' for a unnormalized matrix.
the format specification is '.2g'.

cmap : str or matplotlib Colormap, default='viridis'
Colormap recognized by matplotlib.
Expand Down