multi-imbalance icon indicating copy to clipboard operation
multi-imbalance copied to clipboard

wrong documentation and fucntion calls

Open prabhant opened this issue 2 years ago • 1 comments

MWE:

Seems like the documentation is incorrect here and the samplers are not sklearn API compatible. Also implementing

from multi_imbalance.resampling.soup import SOUP

soup = SOUP(maj_int_min={
        'maj': [0, 1], # indices of majority classes
        'min': [2, 3, 4, 5] # indices of minority classes
    })
X_train_res, y_train_res = soup.fit_transform(X_train, y_train)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-12-97237e7146d3>](https://localhost:8080/#) in <module>()
      6         'min': [2, 3, 4, 5] # indices of minority classes
      7     })
----> 8 X_train_res, y_train_res = soup.fit_transform(X_train, y_train)

AttributeError: 'SOUP' object has no attribute 'fit_transform'

prabhant avatar May 27 '22 09:05 prabhant

fit_transform should be fit_resample

ylevental avatar Oct 23 '23 21:10 ylevental