[R] Redesigned xgboost() interface skeleton (#10456)

---------

Co-authored-by: Michael Mayer <mayermichael79@gmail.com>
This commit is contained in:
david-cortes
2024-07-15 12:44:58 +02:00
committed by GitHub
parent 17c64300e3
commit ab982e7873
35 changed files with 1997 additions and 242 deletions

View File

@@ -178,9 +178,10 @@ parameter:
Using feature name instead
**************************
XGBoost's Python package supports using feature names instead of feature index for
XGBoost's Python and R packages support using feature names instead of feature index for
specifying the constraints. Given a data frame with columns ``["f0", "f1", "f2"]``, the
feature interaction constraint can be specified as ``[["f0", "f2"]]``.
feature interaction constraint can be specified as ``[["f0", "f2"]]`` (Python) or
``list(c("f0", "f2"))`` (R, when passing them to function ``xgboost()``).
**************
Advanced topic

View File

@@ -97,7 +97,8 @@ Some other examples:
Using feature names
*******************
XGBoost's Python package supports using feature names instead of feature index for
XGBoost's Python and R packages support using feature names instead of feature indices for
specifying the constraints. Given a data frame with columns ``["f0", "f1", "f2"]``, the
monotonic constraint can be specified as ``{"f0": 1, "f2": -1}``, and ``"f1"`` will
monotonic constraint can be specified as ``{"f0": 1, "f2": -1}`` (Python) or as
``list(f0=1, f2=-1)`` (R, when using 'xgboost()', but not 'xgb.train'), and ``"f1"`` will
default to ``0`` (no constraint).