11/12/2021

compute_class_weight() takes 1 positional argument but 3 were given

put a explicit parameter name like:

from sklearn.utils import class_weight
class_weights=class_weight.compute_class_weight(class_weight='balanced',classes=np.unique(y),y=y)


Thank you.

www.marearts.com


No comments:

Post a Comment