Skip to contents

Tune a ranger random forest model

Usage

tune_ranger(
  cvfold_list,
  metric = "wape",
  y_var,
  id_vars,
  pred_vars,
  tune_grid = NULL
)

Arguments

cvfold_list

a nested list of cv_sets, each with analysis and assessment

metric

metric to use to select best fit. Options are output of eval_performance.

y_var

string name of column of observed values

id_vars

names of columns used as keys/ids in data.frames

pred_vars

vector string of predictor variables to use in model

tune_grid

grid of parameters to tune over, with each column values for a parameter. If Default (NULL) will create one within the function.

Value

vector of best fitting parameters