XGBoost - Poisson distribution with varying exposure / offset

前端 未结 2 885
無奈伤痛
無奈伤痛 2020-12-31 18:25

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 corr

2条回答
  •  离开以前
    2020-12-31 18:55

    I have now worked out how to do this using setinfo to change the base_margin attribute to be the offset (as a linear predictor), ie:

    setinfo(xgtrain, "base_margin", log(d$exposure))
    

提交回复
热议问题