krishnaik06 / Kaggle-Competitions

124 stars 177 forks source link

XGBoostError: [00:23:51] c:\.\..\workspace\xgboost-win64_release_1.6.0\src\c_api\c_api_utils.h:159: Invalid missing value: null #2

Open kishoremarodia opened 2 years ago

kishoremarodia commented 2 years ago

Created the model and pickled it, however while predicting Y values for Test Data, getting this error.

Command - y_pred = regressor.predict(df_Test) Output

XGBoostError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_26796/2506740906.py in ----> 1 y_pred = regressor.predict(df_Test) 2 sns.heatmap(df_Test.isnull(),yticklabels=False,cbar=False)

C:\ProgramData\Miniconda3\lib\site-packages\xgboost\sklearn.py in predict(self, X, output_margin, ntree_limit, validate_features, base_margin, iteration_range) 1047 if self._can_use_inplace_predict(): 1048 try: -> 1049 predts = self.get_booster().inplace_predict( 1050 data=X, 1051 iteration_range=iteration_range,

C:\ProgramData\Miniconda3\lib\site-packages\xgboost\core.py in inplace_predict(self, data, iteration_range, predict_type, missing, validate_features, base_margin, strict_shape) 2100 from .data import _ensure_npdtype 2101 data, = _ensure_np_dtype(data, data.dtype) -> 2102 _check_call( 2103 _LIB.XGBoosterPredictFromDense( 2104 self.handle,

C:\ProgramData\Miniconda3\lib\site-packages\xgboost\core.py in _check_call(ret) 201 """ 202 if ret != 0: --> 203 raise XGBoostError(py_str(_LIB.XGBGetLastError())) 204 205

XGBoostError: [00:23:51] c:\users\administrator\workspace\xgboost-win64_release_1.6.0\src\c_api\c_api_utils.h:159: Invalid missing value: null