calibrate: Calibrate parameters

Description Usage Arguments Value Examples

View source: R/impute.R

Description

This function returns a vector with the two parameters requiered by the biokNN method where the first value is the weighting parameter and the second the number of neighbors

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
calibrate(
  data,
  className,
  prop_valid = 0.1,
  nIter = 10,
  distance = "gower",
  weight_space = NULL,
  k_space = NULL,
  print = FALSE
)

Arguments

data

A dataframe with missing values

className

name of the variable that contains the classes

prop_valid

proportion of missing values

nIter

number of iterations, default = 10

distance

distance function used to get the k-nearest neighbors

weight_space

vector with the calibration values to test for the weight parameter

k_space

vector with the calibration values to test for the number of neighbors

print

option to print the RMSE values of the parameters used for calibration (print = TRUE).

Value

A dataframe with the imputed data

Examples

1
2
3
4
5
6
7
data(data.example)
calibrate(data.example,
          "class",
          prop_valid = 0.3,
          weight_space = c(0.5, 0.7, 0.9),
          k_space = c(10, 15),
          print = TRUE)

biokNN documentation built on April 22, 2021, 9:07 a.m.

Related to calibrate in biokNN...