It seems that when I am trying to run xgboost, that I am being accosted to check the data values, however i do not have any infinite or nan values. I have been using this code for years, and it seems that recently with one of the package updates this started occurring. Has anyone else witnessed this or know the cause?
Below is showing me evaluating the input data, and the error that occurs when processing my numpy matrices.
np.isnan(x_train).any()
Out[72]: False
np.isnan(y_train).any()
Out[73]: False
min(x_train.flatten())
Out[58]: -1.8606612930273785e+79
max(x_train.flatten())
Out[59]: 1.828733011430676e+79
File "", line 1, in training.train_model(x_train,y_train)
File "C:\Users\kinsm\Dropbox (Personal)\Other\Python\finance\training.py", line 63, in train_model model = model.fit(x, y)
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\core.py", line 436, in inner_f return f(**kwargs)
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\sklearn.py", line 1158, in fit train_dmatrix, evals = _wrap_evaluation_matrices(
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\sklearn.py", line 236, in _wrap_evaluation_matrices train_dmatrix = create_dmatrix(
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\sklearn.py", line 1172, in create_dmatrix=lambda **kwargs: DMatrix(nthread=self.n_jobs, **kwargs),
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\core.py", line 436, in inner_f return f(**kwargs)
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\core.py", line 541, in init handle, feature_names, feature_types = dispatch_data_backend(
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\data.py", line 564, in dispatch_data_backend return _from_numpy_array(data, missing, threads, feature_names,
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\data.py", line 163, in _from_numpy_array _check_call(_LIB.XGDMatrixCreateFromMat_omp(
File "C:\Users\kinsm\anaconda3\lib\site-packages\xgboost\core.py", line 210, in _check_call raise XGBoostError(py_str(_LIB.XGBGetLastError()))
XGBoostError: [10:15:32] C:/Users/Administrator/workspace/xgboost-win64_release_1.4.0/src/data/data.cc:945: Check failed: valid: Input data contains inf or nan