@@ -117,9 +117,9 @@ def plot(self, include_values=True, cmap='viridis',
117
117
return self
118
118
119
119
120
- def plot_confusion_matrix (estimator , X , y_true , sample_weight = None ,
121
- labels = None , display_labels = None ,
122
- include_values = True , normalize = None ,
120
+ def plot_confusion_matrix (estimator , X , y_true , labels = None ,
121
+ sample_weight = None , normalize = None ,
122
+ display_labels = None , include_values = True ,
123
123
xticks_rotation = 'horizontal' ,
124
124
values_format = None ,
125
125
cmap = 'viridis' , ax = None ):
@@ -138,14 +138,19 @@ def plot_confusion_matrix(estimator, X, y_true, sample_weight=None,
138
138
y : array-like of shape (n_samples,)
139
139
Target values.
140
140
141
- sample_weight : array-like of shape (n_samples,), default=None
142
- Sample weights.
143
-
144
141
labels : array-like of shape (n_classes,), default=None
145
142
List of labels to index the matrix. This may be used to reorder or
146
143
select a subset of labels. If `None` is given, those that appear at
147
144
least once in `y_true` or `y_pred` are used in sorted order.
148
145
146
+ sample_weight : array-like of shape (n_samples,), default=None
147
+ Sample weights.
148
+
149
+ normalize : {'true', 'pred', 'all'}, default=None
150
+ Normalizes confusion matrix over the true (rows), predicted (columns)
151
+ conditions or all the population. If None, confusion matrix will not be
152
+ normalized.
153
+
149
154
display_labels : array-like of shape (n_classes,), default=None
150
155
Target names used for plotting. By default, `labels` will be used if
151
156
it is defined, otherwise the unique labels of `y_true` and `y_pred`
@@ -154,11 +159,6 @@ def plot_confusion_matrix(estimator, X, y_true, sample_weight=None,
154
159
include_values : bool, default=True
155
160
Includes values in confusion matrix.
156
161
157
- normalize : {'true', 'pred', 'all'}, default=None
158
- Normalizes confusion matrix over the true (rows), predicted (columns)
159
- conditions or all the population. If None, confusion matrix will not be
160
- normalized.
161
-
162
162
xticks_rotation : {'vertical', 'horizontal'} or float, \
163
163
default='vertical'
164
164
Rotation of xtick labels.
0 commit comments