compute_tuning_parameter: Optimize tuning parameter

Description Usage Arguments Examples

View source: R/random_rotation.R

Description

First sort rotations by complexity (primary criterium) and then perform a grid search over h to find the value that produces the rotation weighting with lowest OOB error.

Usage

1
2
3
4
5
6
7
compute_tuning_parameter(
  v_complex,
  v_oob,
  fn = weights_cut,
  min_step = 1,
  step_size = 1
)

Arguments

v_complex

vector of rotation complexities

v_oob

vector of rotation OOB errors

fn

weight function to use, currently in weights_cut, exp, rre

min_step

minimal value of h to test (maximum is always R, the number of rotations)

step_size

determines the granularity of the grid

Examples

1
compute_tuning_parameter(v_complex=c(10,4,5,4,6), v_oob=c(0.05, 0.03, 0.1, 0.06, 0.02), fn=weights_exp, 0.1, 0.1)

randomrotation/random.rotation documentation built on Dec. 31, 2020, 2:15 a.m.