Gradient-boosted trees via lightgbm::lgb.train(). Binary targets use the
"binary" objective, fractional pseudo-labels "regression" (clipped to
[0, 1] on prediction). Hyperparameters use parsnip-harmonized names.
fit_predict returns out-of-fold predictions via lgb.cv on the folds
xplus() assigns, so the classification cutoff is calibrated on honest
scores rather than memorized ones.
Usage
xplus_backend_lightgbm(
trees = 100,
learn_rate = 0.1,
tree_depth = -1,
min_n = 20,
mtry = NULL,
sample_size = 1,
loss_reduction = 0,
num.threads = 1,
seed = NULL
)Arguments
- trees
Number of boosting rounds (lightgbm
num_iterations).- learn_rate
Shrinkage step (lightgbm
learning_rate).- tree_depth
Maximum tree depth (lightgbm
max_depth;-1unbounded).- min_n
Minimum observations per leaf (lightgbm
min_data_in_leaf).- mtry
Number of features sampled per iteration;
NULLuses all. Converted tofeature_fractionas a proportion ofncol(x).- sample_size
Row subsampling fraction per iteration (lightgbm
bagging_fraction; enables bagging when below 1).- loss_reduction
Minimum gain to split (lightgbm
min_gain_to_split).- num.threads
OpenMP threads (lightgbm
num_threads).- seed
Optional seed passed to each fit;
NULLdraws from R's RNG per fit so thatxplus(seed = ...)remains reproducible.
Examples
if (FALSE) { # \dontrun{
fit <- xplus(x, y, backend = xplus_backend_lightgbm(trees = 200))
} # }