KFCV.MultiWaveAnalysis {TSEAL}R Documentation

KFCV

Description

Performs k-fold cross-validation where groups are chosen randomly. In case the value k is not divisor of the number of observations the last group will have nobs mod k observations.

Usage

## S3 method for class 'MultiWaveAnalysis'
KFCV(data, labels, method, k = 5L, returnClassification = FALSE, ...)

Arguments

data

MultiWaveAnalysis (MWA) object obtained with MultiWaveAnalysis and preferably obtained a subset of its characteristics (StepDiscrim,StepDiscrimV)

labels

labeled vector that classify the observations.

method

Selected method for discrimination. Valid options "linear" "quadratic"

k

the number of folds in KFCV. Must be a positive integer and lower or equal than the number of observations

returnClassification

Allows to select if the raw result classification is returned.

...

Additional arguments

Value

Examples


load(system.file("extdata/ECGExample.rda",package = "TSEAL"))
MWA <- MultiWaveAnalysis(ECGExample, "haar", features = c("var"))
MWADiscrim <- StepDiscrim(MWA, c(rep(1, 5), rep(2, 5)), 5,
              features = c("var"))
CM <- KFCV(MWADiscrim, c(rep(1, 5), rep(2, 5)), "linear", 5,
  returnClassification = FALSE
)



[Package TSEAL version 0.1.3 Index]