Shankar Pandala
Shankar Pandala

Reputation: 1008

XGBoost giving a static prediction of "0.5" randomly

I am using a scikit-learn pipeline with XGBRegressor. Pipeline is working good without any error. When I am prediction with this pipeline, I am predicting the same data multiple times, Sometimes out of random the predictions are coming as 0.5 while the normal prediction range is (1000-10,000)

eg : (1258.2,1258.2,1258.2,1258.2,1258.2,1258.2,0.5,1258.2,1258.2,1258.2,1258.2)

What could be the issue?

Upvotes: 0

Views: 956

Answers (2)

Dror Hilman
Dror Hilman

Reputation: 7457

It is probably because you have Nans or None in your target (y)

Upvotes: 0

yatu
yatu

Reputation: 88305

If you're getting some unusually low predictions, it's probably indicating that the dependent variable has outliers. I'd suggest you to read about it, and about the different strategies to tackle this problem, or recommendations.

Usually its not a good idea to consider all data samples for your model without outlier removal. This will lead to much worse and non-representative metrics.

Upvotes: 1

Related Questions