RangerHyperparameters
VariantRanger random forest. See `setup_Ranger`.
Properties
num_treestunableintegerdefault500≥ 1Number of trees.
mtryinteger | integer[] | nulldefaultnull≥ 1≥ 1 itemsNumber of features considered at each split. NULL = ranger default. Cannot exceed the number of features in the training data.
importancestringdefault"impurity"Variable importance mode.
one of
"none""impurity""impurity_corrected""permutation"write_forestbooleandefaulttrueSave the forest object (required for prediction).
probabilitybooleandefaultfalseGrow a probability forest (classification only).
min_node_sizeinteger | integer[] | nulldefaultnull≥ 1≥ 1 itemsMinimal node size. NULL = ranger default by task type.
min_bucketinteger | nulldefaultnull≥ 1Minimal number of samples in a terminal node (survival only).
max_depthinteger | integer[] | nulldefaultnull≥ 0≥ 1 itemsMaximal tree depth. NULL or 0 = unlimited.
replacetunablebooleandefaulttrueSample with replacement.
sample_fractiontunablenumberdefault1≤ 1> 0Fraction of observations to sample per tree.
case_weightsarray | nulldefaultnull≥ 1 itemsPer-observation sampling weights. Must have one value per case.
class_weightsarray | nulldefaultnull≥ 1 itemsPer-class weights (classification only). Must have one value per class.
splitrulestring | string[] | nulldefaultnull≥ 1 itemsSplitting rule (task-dependent). NULL = ranger default.
num_random_splitstunableintegerdefault1≥ 1Random splits per candidate variable (extratrees splitrule).
alphatunablenumberdefault0.5≥ 0≤ 1Significance threshold to allow splitting (maxstat splitrule).
minproptunablenumberdefault0.1≥ 0≤ 1Lower quantile of covariate distribution considered for splitting (maxstat splitrule).
poisson_taunumberdefault1> 0Tau parameter (poisson splitrule).
always_split_variablesarray | nulldefaultnull≥ 1 itemsVariables always included as split candidates. Values must name training features.
scale_permutation_importancebooleandefaultfalseScale permutation importance by its standard error.
local_importancebooleandefaultfalseCompute local (per-observation) permutation importance.
regularization_factortunablenumberdefault1≥ 0Regularization factor penalizing variables with many split points.
regularization_usedepthbooleandefaultfalseApply the regularization factor with node depth.
keep_inbagbooleandefaultfalseRecord how often each observation is in-bag per tree.
holdoutbooleandefaultfalseHold-out mode: hold out samples with case weight 0.
quantregbooleandefaultfalsePrepare quantile prediction (regression only).
time_interestarray | nulldefaultnull≥ 1 itemsTime points of interest for survival prediction.
oob_errorbooleandefaulttrueCompute the OOB prediction error.
save_memorybooleandefaultfalseUse the memory-saving (slower) splitting mode.
verbosebooleandefaulttrueShow ranger computation status.
node_statsbooleandefaultfalseSave additional node statistics.
seedinteger | nulldefaultnullRandom seed. NULL = generated from R.
na_actionstringdefault"na.learn"How to handle missing values.
one of
"na.learn""na.omit""na.fail"ifwtunablebooleandefaultfalseInverse Frequency Weighting in classification.
split_select_weightsnumber[] | number[][] | null≥ 1 items≥ 1 itemsOptional per-feature split-selection probabilities in [0, 1]: a single vector applied to every tree, or a list of length `num_trees` with one weight vector per tree. null uses the ranger default.
respect_unordered_factorsstring | boolean | nullHandling of unordered factors: "partition", "ignore", or "order"; or a logical (TRUE corresponds to "partition"). null uses the ranger default.
one of
"partition""ignore""order"inbaginteger[][] | null≥ 1 itemsOptional manually-set in-bag counts: a list of length `num_trees`, each a per-observation vector of non-negative counts. null uses the ranger default (bootstrap sampling).
Relationships
Used by