xgboost predict method returns the same predicted value for all rows

后端 未结 6 2238
南方客
南方客 2020-12-09 13:37

I\'ve created an xgboost classifier in Python:

train is a pandas dataframe with 100k rows and 50 features as columns. target is a pandas series

xgb_cla         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 14:00

    One of the reasons for the same is that you're providing a high penalty through parameter gamma. Compare the mean value of your training response variable and check if the prediction is close to this. If yes then the model is restricting too much on the prediction to keep train-rmse and val-rmse as close as possible. Your prediction is the simplest with higher value of gamma. So you'll get the simplest model prediction like mean of training set as prediction or naive prediction.

提交回复
热议问题