XGB custom objective function - small change to default regression squared error objective function

datascience.stackexchange https://datascience.stackexchange.com/questions/76191

  •  12-12-2020
  •  | 
  •  

質問

Where can I find the code for the default squared error objective function? I just want to make a small change to re-weight certain datapoints?

役に立ちましたか?

解決

You can find a good explanation and example on creating a custom objective function here:

https://xgboost.readthedocs.io/en/latest/tutorials/custom_metric_obj.html

https://github.com/dmlc/xgboost/blob/master/demo/guide-python/custom_objective.py

https://github.com/dmlc/xgboost/blob/master/demo/guide-python/custom_rmsle.py

Original XGB code repo is here, you may have to do some digging to find the code for your objective function:

https://github.com/dmlc/xgboost

ライセンス: CC-BY-SA帰属
所属していません datascience.stackexchange
scroll top