6

I have this code:

from imblearn.over_sampling import ADASYN

Y = df.target
X = df.drop('target', axis=1)

ad = ADASYN()
X_adasyn, y_adasyn = ad.fit_sample(X, Y)

getting this error:

ValueError: No samples will be generated with the provided ratio 
settings.
omer karabey
  • 63
  • 1
  • 4

2 Answers2

6

I had this problem too, finally i solved it!

  1. you should use sampling_strategy instead of ratio
  2. sampling_strategy='minority'

I tried other options such as 'not_majority' ,'auto' and dictionary form, all of them gave the following error

Value Error: No samples will be generated with the provided ratio settings

but 'minority' worked.

Simon.S.A.
  • 6,240
  • 7
  • 22
  • 41
2

Make it a two. There is github and it explicitly says:

if not np.sum(n_samples_generate):
                raise ValueError("No samples will be generated with the"
                                 " provided ratio settings.")

but, yeah......#

Noah Weber
  • 312
  • 2
  • 13