I’m getting negative predictions when using a custom evaluation metric (custom_rmse) while using objective : “reg:tweedie”.
I’m performing a regression task which has no negative values.
To sanity check I did put both my custom_rmse as feval in xgb.train api and also passed “rmse” as a eval_metric in xgb.train parameters.
When I use objective : “reg:squarederror” both rmse and custom_rmse comes same, but when I use the “reg:tweedie” they both differ vastly. The inbuild rmse works fine in both cases but my custom evalution metric give some nonsense rmse.
Digging in deep I checked the predictions that my custom metric was getting and found that all the predictions were negative.
What could be the possible issue here?
Example on how the predictions vary when using squared error and tweedie objective :