Skip to content

Commit

Permalink
fixed error message for invalid class_weight values
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Jun 1, 2016
1 parent 1f76574 commit 5a333cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/utils/class_weight.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def compute_class_weight(class_weight, classes, y):
# user-defined dictionary
weight = np.ones(classes.shape[0], dtype=np.float64, order='C')
if not isinstance(class_weight, dict):
raise ValueError("class_weight must be dict, 'auto', or None,"
raise ValueError("class_weight must be dict, 'balanced', or None,"
" got: %r" % class_weight)
for c in class_weight:
i = np.searchsorted(classes, c)
Expand Down

0 comments on commit 5a333cd

Please sign in to comment.