finetune_RF: Fine tune the parameters of a random forest

View source: R/fine_tunning_RF.R

finetune_RFR Documentation

Fine tune the parameters of a random forest

Description

Fine tune the parameters of a random forest

Usage

finetune_RF(
  values_to_try,
  param_to_tune,
  formula,
  data,
  rep = 10,
  Ncpu = 1,
  target = "staff_rangers_log",
  fn = mean,
  ...
)

finetune_RF_grid(grid, formula, data, rep = 10, Ncpu = 1, fn = mean, ...)

Arguments

values_to_try

the parameter value to try

param_to_tune

the quoted name of the parameter to study

formula

the formula for the forest

data

the full dataset

rep

the number of cross validation replicates (default = 10)

Ncpu

the number of CPU cores to be used (default = 1)

target

the name of the response variable

fn

the function for aggregating all metrics but p-values

...

additional parameters to be passed to ranger::ranger()

grid

a data frame defining the combination of parameters to try

Value

a list with a data frame and a plot

Functions

  • finetune_RF_grid(): Fine tune the parameters of a random forest all at once


courtiol/rangeRinPA documentation built on Sept. 29, 2022, 9:54 a.m.