You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good catch, will have to think of a proper way to resolve this. Simply adding one may be sufficient as this is a relatively simple heuristic, but need to give it a bit of thought.
I've opted to go for the adding 1 option in PR #183 -- I was just looking for a relatively soft re-weighting option when I added this in, and that should satisfy that requirement. Will be in the development shortly and available as part of the next release (0.5.12). Thanks again for the bug report @Guillermogsjc
This makes that training ignores the most frequent class.
Reproduce example:
`import numpy
import pandas
from finetune.imbalance import compute_class_weights
np.random.seed(0)
y = pd.Series(np.random.choice(a=[0, 1, 2], size=1000, p=[0.3, 0.6, 0.1]))
print(y.value_counts(normalize=True))
print(compute_class_weights('log', y))`
The text was updated successfully, but these errors were encountered: