wrapper_ranger: Random Forest wrapper for CCI

View source: R/wrappers.R

wrapper_rangerR Documentation

Random Forest wrapper for CCI

Description

Random Forest wrapper for CCI

Usage

wrapper_ranger(
  formula,
  data,
  train_indices,
  test_indices,
  metric,
  metricfunc = NULL,
  nthread = 1,
  ...
)

Arguments

formula

Model formula specifying the dependent and independent variables.

data

Data frame containing the dataset to be used for training and testing the model.

train_indices

A vector of indices specifying the rows in data to be used as the training set.

test_indices

A vector of indices specifying the rows in data to be used as the test set.

metric

Character string indicating the type of performance metric. Can be "RMSE" for regression, "Kappa" for binary classification, or multiclass classification.

metricfunc

Optional user-defined function to calculate a custom performance metric. This function should take the arguments data, model, and test_indices, and return a numeric value representing the performance metric.

nthread

Integer. The number of threads to use for parallel processing. Default is 1.

...

Additional arguments passed to the ranger function.

Value

A numeric value representing the performance metric of the model on the test set.


CCI documentation built on Aug. 29, 2025, 5:17 p.m.