Learn R Programming

CCI (version 0.3.6)

wrapper_ranger: 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,
  mtry = NULL,
  num.trees,
  eps = 1e-15,
  ...
)

Value

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

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

Type of metric ("RMSE", "Kappa" or "Log Loss")

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.

mtry

Integer. The number of variables to possibly split at in each node. Default is the square root of the number of columns in data.

num.trees

Integer. The number of trees to grow in the random forest.

eps

Small value to avoid log(0) in LogLoss calculations. Default is 1e-15.

...

Additional arguments passed to the ranger function.