# Appropriate objective function and evaluation metric when I DO care about outliers?

I am reading these two pages: xgboost documentation Post on evaluation metrics

I have a dataset where I am trying to predict future spend at the user level. A lot of our spend comes from large spenders, outliers. So, we care about them. I am using XGBoost.

I have tried xgboost with objective reg:squarederror. This tended to underpredict a little. I then tried with reg:squaredlogerror and this resulted in predictions that under predict by much more than just using squarederror.

I have tried tuning with several differing hyper parameter combinations but none made as big a difference as changing the objective. So, I'm dwelling on the objective function and trying to understand if there's another one out there that would be worth a shot?

On the xgboost docs above, some of the out of the other regression objective options are reg:pseudohubererror as well as count:poisson.

There is no option, that I can see, for just MAE. If using an objective function less susceptible to outliers with rmsle took me further away from accuracy whereas rmse took me closer, would using MAE potentially be worth a shot? In this dataset, outliers are more important, but so are regular users.

What would be a good objective and evaluation metric? Is MAE worth trying? If so, how? Looking at the docs above, I cannot see MAE as an option under regression parameters.

• With MAE it will be even less sensitive to outliers than with MSE Jul 6, 2020 at 16:46
• In that case, more in the direction of rmsle which took me further away? Jul 6, 2020 at 16:53
• Asking my question in another way, is there an objective function more sensitive to outliers than rmse? Jul 6, 2020 at 17:02
• Given what you've shared, I'd try to improve the model (feature selection/transformation, regularization if overfitting is your problem, etc), not the loss function. MSE sounds good for your issue. Jul 7, 2020 at 13:34

• Use quartic error, $$(y - \hat{y})^4$$, instead of quadratic error. This is going to penalize a lot big errors, way more than MSE. The issue is that this is not implemented in xgboost, and you would need to develop a custom loss.