LOOCV.MultiWaveAnalysis: LOOCV

View source: R/Discriminant.R

LOOCV.MultiWaveAnalysisR Documentation

LOOCV

Description

Performs a leave-one-cross-validation (LOOCV) method on a MultiWaveAnalysis object. It is advisable to have selected a subset of all features (StepDiscrim,StepDiscrimV)

Usage

## S3 method for class 'MultiWaveAnalysis'
LOOCV(data, labels, method, returnClassification = FALSE, ...)

Arguments

data

MultiWaveAnalysis object obtained with MultiWaveAnalysis function 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"

returnClassification

Allows to select if the raw result classification is returned.

...

Additional arguments

Value

  • if returnClassification is false return a object of class confusionMatrix

  • if returnClassification is true, it returns a list containing an object of the confusionMatrix class and a vector with the classification result.

See Also

  • LOOCV

  • LOOCV.array

  • StepDiscrim

  • StepDiscrimV

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 <- LOOCV(MWADiscrim, c(rep(1, 5), rep(2, 5)), "linear")



TSEAL documentation built on July 2, 2024, 5:06 p.m.