Fits an extremal random forest (ERF).

erf(
  X,
  Y,
  min.node.size = 5,
  lambda = 0.001,
  intermediate_estimator = c("grf", "neural_nets"),
  intermediate_quantile = 0.8
)

Arguments

X

Numeric matrix of predictors, where each row corresponds to an observation and each column to a predictor.

Y

Numeric vector of responses.

min.node.size

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 5.

lambda

Penalty for the shape parameter used in the weighted likelihood. Default is 0.001.

intermediate_estimator

A character specifying the estimator used to fit the intermediate threshold. Options available are:

intermediate_quantile

Intermediate quantile level, used to predict the intermediate threshold. For further information see Terefe et al. (2020) . Default is 0.8.

Value

An object with S3 class "erf". It is a named list with the following elements:

quantile_forest

An object with S3 class "quantile_forest" (see grf::quantile_forest()). This is a fitted generalized random forest that contains the similarity weights used in the log-likelihood.

min.node.size

Minimum number of observations in each tree leaf used to fit the quantile_forest.

lambda

Penalty for the shape parameter used in the weighted log-likelihood.

intermediate_threshold

An object with S3 class:

  • "quantile_forest", if intermediate_estimator = "grf".

  • "neural_nets", if intermediate_estimator = "neural_nets (note: this option is not yet implemented)

This is a fitted object used to predict the intermediate thresholds.

intermediate_quantile

Intermediate quantile level, used to predict the intermediate threshold.

Q_X

Vector with intermediate quantile predicted on the training data X.