-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[R] Add parameters constructor #11072
Conversation
Since this PR concerns the user interface, would be great if we could get some help for review from an R user's perspective @mayer79 @jameslamb |
Very good idea! |
Co-authored-by: Michael Mayer <[email protected]>
#' - `"reg:absoluteerror"`: Regression with L1 error. When tree model is used, leaf value is refreshed after tree construction. If used in distributed training, the leaf value is calculated as the mean value from all workers, which is not guaranteed to be optimal. | ||
#' | ||
#' Version added: 1.7.0 | ||
#' - `"reg:quantileerror"`: Quantile loss, also known as "pinball loss". See later sections for its parameter and [Quantile Regression](https://xgboost.readthedocs.io/en/latest/python/examples/quantile_regression.html#sphx-glr-python-examples-quantile-regression-py) for a worked example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Python example, do we want to include it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say python examples are still relevant.
Thanks for the
I think it's a great idea, and would definitely be helpful for interactive development. Some suggestions (to consider in follow-ups, given that this was already merged):
xgboost/R-package/R/xgb.train.R Line 811 in 85ccb8f
I also would have asked for a little research supporting it being safe to change |
@jameslamb Thank you for the suggestion, I have converted your comment into a new tracking issue #11083 |
ref #9810
This PR adds a utility function to return a list of XGBoost parameters, with docs about all of them copied from the .rst files with slight modifications considering that they are meant exclusively for the R package. I'm not entirely sure whether all of them are applicable though.
The idea behind this constructor function is to offer an IDE-friendly way of creating and discovering XGBoost parameters, with full in-package documentation as is typical in R packages. It should be possible to reuse these same docs later on in
xgboost()
as needed through@inheritParams
, but for now I'm only using this forxgb.train
andxgb.cv
.Since this introduces a new function with a somewhat similar name as a completely different method in the package, it also renames that method in the process in order to avoid confusions and IDE miscompletions.