Fits an extremal random forest (ERF) with cross-validation.
Numeric matrix of predictors, where each row corresponds to an observation and each column to a predictor.
Numeric vector of responses.
Vector with minimum number of observations in each tree
leaf used to fit the similarity weights
(see also grf::quantile_forest()).
Nodes with size smaller than min.node.size can occur,
as in the original randomForest package.
Default is c(5, 40, 100).
Vector with penalties for the shape parameter used in the weighted likelihood.
Default is c(0, 0.001, 0.01).
A character specifying the estimator used to fit the intermediate threshold. Options available are:
grf, see grf::quantile_forest().
neural_nets, (coming soon).
Intermediate quantile
level, used to predict the intermediate threshold.
For further information see Terefe et al. (2020)
.
Default is 0.8.
Number of folds in the cross-validation scheme.
Default is 5.
Number of times nfolds cross-validation is repeated.
Default is 3.
Random seed to reproduce the fold splits.
Default is NULL.
An object with S3 class "erf_cv".
It is a named list with the following elements:
A tibble with columns: min.node.size, lambda, cvm
(mean cross-validated error).
A fitted "erf" object on the full data using the optimal
min.node.size and lambda.