目前不支持分位数回归。
可以通过在用户端定义目标函数来实现: https ://github.com/dmlc/xgboost/blob/master/R-package/demo/custom_objective.R
使用 xgboost 进行分位数回归需要自定义梯度和 hessian 函数。 这是 Python 中的一个实现:http: //www.bigdatarepublic.nl/regression-prediction-intervals-with-xgboost/
请注意,实现对大多数用户来说并不是很有用,因为它指定了网格搜索三个参数(非常昂贵)以获得分位数估计。 在 sklearn 中,您只定义分位数值,并为您提供对该分位数的非常稳健和可靠的估计。
最有用的评论
使用 xgboost 进行分位数回归需要自定义梯度和 hessian 函数。 这是 Python 中的一个实现:http: //www.bigdatarepublic.nl/regression-prediction-intervals-with-xgboost/