Skip to content

Commit

Permalink
Merge pull request #216 from Sassy-Nazogram/fix.class_weight_invalid_…
Browse files Browse the repository at this point in the history
…parameter

fix: classes parameter (change np.array)
  • Loading branch information
muellerdo authored Feb 21, 2024
2 parents 7152f87 + 78b3078 commit f5f6e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aucmedi/utils/class_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def compute_multilabel_weights(ohe_array, method="balanced"):
class_weights = np.empty([n_classes])
# Compute weight for each class individually
for i in range(0, n_classes):
weight = compute_class_weight(class_weight=method, classes=[0,1],
weight = compute_class_weight(class_weight=method, classes=np.array([0,1]),
y=ohe_array[:, i])
class_weights[i] = weight[1]
# Return resulting class weight list
Expand Down

0 comments on commit f5f6e5d

Please sign in to comment.