Closed
Description
In the file class_weight.py, in the function compute_class_weight, is the piece of code:
for c in class_weight:
i = np.searchsorted(classes, c)
if i >= len(classes) or classes[i] != c:
raise ValueError("Class label %d not present." % c)
else:
weight[i] = class_weight[c]
The line "Class label %d not present." % c
fails if the class label is a string, not an integer.
Metadata
Metadata
Assignees
Labels
No labels