Primary competition visual

Expresso Churn Prediction Challenge

Helping Senegal
$1 000 USD
Completed (over 4 years ago)
Classification
Prediction
1378 joined
437 active
Starti
Aug 27, 21
Closei
Nov 28, 21
Reveali
Nov 28, 21
Error: Input contains NaN, infinity or a value too large for dtype('float64')
Help · 15 Nov 2021, 21:27 · 3

Hi there,

I'm trying to do this to handle the imbalanced distribution of the target variable:

os = RandomOverSampler(1, random_state=1)

X_train, y_train = os.fit_sample(X, y)

But it doesn't work and I get this error: Input contains NaN, infinity or a value too large for dtype('float64').

I checked my data and it does not contain NaN or infinity. I can't figure out what the problem is. 😔

Discussion 3 answers
User avatar
Gikunju

check your target variable whether its an integer or float. if a float convert it to integer

16 Nov 2021, 03:13
Upvotes 0
User avatar
Gikunju

then run the model it should work

16 Nov 2021, 03:13
Upvotes 0