RangerHyperparameters
VariantRanger random forest. See `setup_Ranger`.
Properties
num_treestunableinteger≥ 1Number of trees.
mtryinteger | integer[] | null≥ 1≥ 1 itemsNumber of features considered at each split. NULL = ranger default. Cannot exceed the number of features in the training data.
importancestringVariable importance mode.
one of
"none""impurity""impurity_corrected""permutation"write_forestbooleanSave the forest object (required for prediction).
probabilitybooleanGrow a probability forest (classification only).
min_node_sizeinteger | integer[] | null≥ 1≥ 1 itemsMinimal node size. NULL = ranger default by task type.
min_bucketinteger | null≥ 1Minimal number of samples in a terminal node (survival only).
max_depthinteger | integer[] | null≥ 0≥ 1 itemsMaximal tree depth. NULL or 0 = unlimited.
replacetunablebooleanSample with replacement.
sample_fractiontunablenumber≤ 1> 0Fraction of observations to sample per tree.
case_weightsarray | null≥ 1 itemsPer-observation sampling weights. Must have one value per case.
class_weightsarray | null≥ 1 itemsPer-class weights (classification only). Must have one value per class.
splitrulestring | string[] | null≥ 1 itemsSplitting rule (task-dependent). NULL = ranger default.
num_random_splitstunableinteger≥ 1Random splits per candidate variable (extratrees splitrule).
alphatunablenumber≥ 0≤ 1Significance threshold to allow splitting (maxstat splitrule).
minproptunablenumber≥ 0≤ 1Lower quantile of covariate distribution considered for splitting (maxstat splitrule).
poisson_taunumber> 0Tau parameter (poisson splitrule).
split_select_weightsnumber[] | number[][] | null≥ 1 items≥ 1 itemsPer-feature split-selection probabilities: one vector applied to every tree, or one vector per tree.
always_split_variablesarray | null≥ 1 itemsVariables always included as split candidates. Values must name training features.
respect_unordered_factorsstring | nullHandling of unordered factors. NULL uses the ranger default.
one of
"partition""ignore""order"scale_permutation_importancebooleanScale permutation importance by its standard error.
local_importancebooleanCompute local (per-observation) permutation importance.
regularization_factortunablenumber≥ 0Regularization factor penalizing variables with many split points.
regularization_usedepthbooleanApply the regularization factor with node depth.
keep_inbagbooleanRecord how often each observation is in-bag per tree.
inbagarray | null≥ 1 itemsManually set in-bag counts: one per-case count vector per tree.
holdoutbooleanHold-out mode: hold out samples with case weight 0.
quantregbooleanPrepare quantile prediction (regression only).
time_interestarray | null≥ 1 itemsTime points of interest for survival prediction.
oob_errorbooleanCompute the OOB prediction error.
save_memorybooleanUse the memory-saving (slower) splitting mode.
verbosebooleanShow ranger computation status.
node_statsbooleanSave additional node statistics.
seedinteger | nullRandom seed. NULL = generated from R.
na_actionstringHow to handle missing values.
one of
"na.learn""na.omit""na.fail"ifwtunablebooleanInverse Frequency Weighting in classification.
Relationships
Used by