XGBoost - Poisson distribution with varying exposure / offset
问题 I am trying to use XGBoost to model claims frequency of data generated from unequal length exposure periods, but have been unable to get the model to treat the exposure correctly. I would normally do this by setting log(exposure) as an offset - are you able to do this in XGBoost? (A similar question was posted here: xgboost, offset exposure?) To illustrate the issue, the R code below generates some data with the fields: x1, x2 - factors (either 0 or 1) exposure - length of policy period on