-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Move skl eval_metric
and early_stopping rounds
to model params.
#6751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bfbff06
to
bfaf638
Compare
A summary of the changes in this PR: A new parameter
Added more detailed documents for the behaviour of custom objective and metric. |
Codecov Report
@@ Coverage Diff @@
## master #6751 +/- ##
==========================================
+ Coverage 83.71% 83.80% +0.09%
==========================================
Files 13 13
Lines 3892 3939 +47
==========================================
+ Hits 3258 3301 +43
- Misses 634 638 +4
Continue to review full report at Codecov.
|
I will move the callback parameter too in next PR. This one is huge as it's. |
These 2 parameters are now model parameters that can be set at constructor and `set_params` method. Doc and test. Fix return. non breaking. mypy. Configuration. Add test/example. Use output-margin only when objective is provided. hint. Deprecation notice. Document. Lint. test. mypy. Add document. Cleanup. Add custom_metric. Fix softmax. test. Prevent softmax. Lint. fix. Doc. Contents. Note. More documents. Format. Fix. Fix dask. Fix dask. Check RF. Apply suggestions from code review
8e37ccb
to
1263ef6
Compare
…l params. (dmlc#6751) A new parameter `custom_metric` is added to `train` and `cv` to distinguish the behaviour from the old `feval`. And `feval` is deprecated. The new `custom_metric` receives transformed prediction when the built-in objective is used. This enables XGBoost to use cost functions from other libraries like scikit-learn directly without going through the definition of the link function. `eval_metric` and `early_stopping_rounds` in sklearn interface are moved from `fit` to `__init__` and is now saved as part of the scikit-learn model. The old ones in `fit` function are now deprecated. The new `eval_metric` in `__init__` has the same new behaviour as `custom_metric`. Added more detailed documents for the behaviour of custom objective and metric.
Close #6735.
Close #6445.
See the comment below for a brief summary.