LightRFHyperparameters
VariantLightGBM random forest. See `setup_LightRF`.
Properties
boostingstringBoosting type. 'rf' is what makes LightGBM a random forest.
learning_ratenumberLearning rate. No effect in 'rf' mode; set for clarity.
bagging_freqnumberBagging frequency.
early_stopping_roundsnumberEarly stopping rounds. -1 disables early stopping.
nroundsinteger | object≥ 1Number of boosting rounds (trees).
num_leavesinteger | object≥ 1Maximum number of leaves per tree.
max_depthinteger | objectMaximum tree depth. -1 = no limit.
feature_fractionnumber | object | null≤ 1> 0Fraction of features sampled per tree. NULL = sqrt(n_features)/n_features for classification, 0.33 for regression.
bagging_fractionnumber | object≤ 1> 0Fraction of cases sampled per tree (bagging fraction).
lambda_l1number | object≥ 0L1 regularization.
lambda_l2number | object≥ 0L2 regularization.
max_cat_thresholdinteger | object≥ 1Maximum number of split points for categorical features.
min_data_per_groupinteger | object≥ 1Minimum number of cases per categorical group.
linear_treeboolean | objectFit linear models at leaves.
ifwboolean | objectInverse frequency weighting of outcome classes.
objectivestring | nullLightGBM objective. NULL = set from outcome type.
device_typestringCompute device.
one of
"cpu""gpu""cuda"tree_learnerstringTree learner type.
one of
"serial""feature""data""voting"force_col_wisebooleanForce column-wise histogram building (CPU only).
alphanumber | object | null> 0Huber delta or quantile level. NULL = LightGBM's default of 0.9. Applies only when objective is huber or quantile.
tweedie_variance_powernumber | object | null≥ 1< 2Tweedie power: 1 is Poisson-like, near 2 is gamma-like. NULL = LightGBM's default of 1.5. Applies only when objective is tweedie.
fair_cnumber | object | null> 0Fair loss scale. NULL = LightGBM's default of 1. Applies only when objective is fair.
poisson_max_delta_stepnumber | object | null> 0Step cap safeguarding Poisson optimization. NULL = LightGBM's default of 0.7. Applies only when objective is poisson.
sigmoidnumber | object | null> 0Sigmoid slope, for a binary or one-vs-all objective. NULL = LightGBM's default of 1.
boost_from_averageboolean | nullStart from the outcome's mean, for a regression, binary or cross-entropy objective. NULL = LightGBM's default of TRUE.
reg_sqrtboolean | nullFit the square root of the outcome and square the prediction back, for a regression objective. NULL = LightGBM's default of FALSE.
min_data_in_leafinteger | object≥ 0Minimum number of cases in a leaf.
min_sum_hessian_in_leafnumber | object≥ 0Minimum sum of hessians in a leaf: the smooth counterpart of a case count.
min_gain_to_splitnumber | object≥ 0Minimum loss reduction a split must buy to be made.
max_delta_stepnumber | objectCap on each leaf's output; 0 or less leaves it uncapped.
path_smoothnumber | object≥ 0Smooth each leaf towards its parent, more strongly the fewer cases it holds.
extra_treesboolean | objectChoose one split threshold per feature at random rather than the best.
extra_seedintegerRandom seed for the thresholds `extra_trees` draws.
linear_lambdanumber | object | null≥ 0L2 penalty on the linear models fitted at the leaves. NULL = LightGBM's default of 0. Applies only when linear_tree is TRUE.
max_bininteger | object≥ 2Most bins a feature is discretized into. Fewer is faster and more regularized.
min_data_in_bininteger | object≥ 1Minimum number of cases per bin.
use_missingbooleanHandle missing values. FALSE ignores them.
zero_as_missingbooleanTreat zeros as missing, rather than only NA.
cat_l2number | object≥ 0L2 regularization on a categorical split.
cat_smoothnumber | object≥ 0Smoothing over categorical levels, which reduces the effect of rare ones.
max_cat_to_onehotinteger | object≥ 1Below this many levels, split one-versus-rest rather than by partition.
deterministicbooleanForce reproducible results at some cost in speed. Requires a forced histogram direction.
objective_seedintegerRandom seed for the objective, where it draws.
force_row_wisebooleanForce row-wise histogram building. Cheaper in memory than column-wise, slower per iteration.
histogram_pool_sizenumberMemory cap in MB for the histogram cache; -1 leaves it uncapped.
top_kinteger | object | null≥ 1Features each machine votes for in the voting tree learner. NULL = LightGBM's default of 20. Applies only when tree_learner is voting.
pos_bagging_fractionnumber | object≤ 1> 0Fraction of positive cases sampled per tree, for a binary outcome.
neg_bagging_fractionnumber | object≤ 1> 0Fraction of negative cases sampled per tree, for a binary outcome.
bagging_seedintegerRandom seed for bagging.
feature_fraction_bynodenumber | object≤ 1> 0Fraction of features sampled at each node, on top of the per-tree fraction.
feature_fraction_seedintegerRandom seed for feature sampling.
cegb_tradeoffnumber | object≥ 0Overall multiplier on every cost-efficiency penalty below.
cegb_penalty_splitnumber | object≥ 0Cost charged per split, in units of loss reduction.
cegb_penalty_feature_lazynumber[] | number[][] | null≥ 1 items≥ 1 itemsPer-feature cost charged the first time a case uses it, one value per feature.
cegb_penalty_feature_couplednumber[] | number[][] | null≥ 1 items≥ 1 itemsPer-feature cost charged the first time any case uses it, one value per feature.
use_quantized_gradbooleanDiscretize gradients before finding splits. Faster, and changes the fit.
num_grad_quant_binsinteger | object | null≥ 2Bins the gradients are discretized into. NULL = LightGBM's default of 4. Applies only when use_quantized_grad is TRUE.
quant_train_renew_leafboolean | nullRecompute leaf values from the exact gradients after each iteration. NULL = LightGBM's default of FALSE. Applies only when use_quantized_grad is TRUE.
stochastic_roundingboolean | nullRound gradients stochastically rather than to nearest. NULL = LightGBM's default of TRUE. Applies only when use_quantized_grad is TRUE.
monotone_constraintsarray | null≥ 1 itemsPer-feature monotonicity: 1 increasing, -1 decreasing, 0 unconstrained. Must have one value per feature.
monotone_constraints_methodstring | nullHow monotonicity is enforced: 'basic' is fastest, 'advanced' least restrictive. Applies only when monotone_constraints is -1 or 1.
one of
"basic""intermediate""advanced"nullmonotone_penaltynumber | object | null≥ 0Depth penalty on splits that would break monotonicity. NULL = LightGBM's default of 0. Applies only when monotone_constraints is -1 or 1.
interaction_constraintsstring | nullFeature groups permitted to interact, in LightGBM's own bracketed form, e.g. "[0,1],[2,3]".
feature_contriarray | null≥ 1 itemsPer-feature multiplier on split gain, one value per feature. Must have one value per feature.
early_stopping_min_deltanumber | object≥ 0Smallest improvement that resets the early-stopping counter.
Relationships
Used by