ValueError: Input contains NaN, infinity or a value too large for dtype('float32')


#1

Hello

I try to run XGBoost Regressor with Sklearn: But when I run the code : I have this error :
ValueError: Input contains NaN, infinity or a value too large for dtype(‘float32’).

Thanks


#2

As the error message suggests, check your input data.


#3

Thanks for answer but in my data I don’t have Nan Value, I try some method to filting nan but also does’n worked .

I don’t know if you have some solutions because I want ao apply XGBoost regressor and cross validation


#4

The error may be coming from scikit-learn, not XGBoost. See https://datascience.stackexchange.com/questions/11928/valueerror-input-contains-nan-infinity-or-a-value-too-large-for-dtypefloat32