Skip to content

Commit 5a333cd

Browse files
committed
fixed error message for invalid class_weight values
1 parent 1f76574 commit 5a333cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/utils/class_weight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def compute_class_weight(class_weight, classes, y):
7171
# user-defined dictionary
7272
weight = np.ones(classes.shape[0], dtype=np.float64, order='C')
7373
if not isinstance(class_weight, dict):
74-
raise ValueError("class_weight must be dict, 'auto', or None,"
74+
raise ValueError("class_weight must be dict, 'balanced', or None,"
7575
" got: %r" % class_weight)
7676
for c in class_weight:
7777
i = np.searchsorted(classes, c)

0 commit comments

Comments
 (0)