Home > other >  AttributeError: 'RandomOverSampler' object has no attribute '_validate_data'
AttributeError: 'RandomOverSampler' object has no attribute '_validate_data'

Time:09-15

The from imblearn. Over_sampling import RandomOverSampler
When I did the sampling, the import the package, and then do when fit, the following code
X_train X_test, y_train, y_test=train_test_split (X, y, test_size=0.2, random_state=0)
Ros=RandomOverSampler (random_state=0.2)

X_resampled, y_resampled=ros. Fit_sample (X, y)

There is an error, the error is as follows:
AttributeError: 'RandomOverSampler' object has no attribute '_validate_data'

Questions such as why? Because my bag is there a problem? Use this bag EasyEnsembleClassifier, will quote this fault, and then I saw my installation package, their version is as follows:
Imblearn - 0.0. Dist - info
Imblearn
Imbalanced_learn - 0.7.0. Dist - info
But there were no imbalanced_learn folder, how to install all have no I don't know why
  • Related