* Change DefaultEvalMetric of classification from error to logloss * Change default binary metric in plugin/example/custom_obj.cc * Set old error metric in python tests * Set old error metric in R tests * Fix missed eval metrics and typos in R tests * Fix setting eval_metric twice in R tests * Add warning for empty eval_metric for classification * Fix Dask tests Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
XGBoost Plugin Example
This folder provides an example of implementing xgboost plugin.
There are three steps you need to do to add a plugin to xgboost
- Create your source .cc file, implement a new extension
- In this example custom_obj.cc
- Register this extension to xgboost via a registration macro
- In this example
XGBOOST_REGISTER_OBJECTIVEin this line
- In this example
- Add a line to
xgboost/plugin/CMakeLists.txt:
set(PLUGINS_SOURCES ${PLUGINS_SOURCES}
${xgboost_SOURCE_DIR}/plugin/example/custom_obj.cc PARENT_SCOPE)
Then you can test this plugin by using objective=mylogistic parameter.