trainModel.MultiWaveAnalysis {TSEAL} | R Documentation |
Generates a discriminant model from an already generated "MultiWaveAnalysis".
Description
Generates a discriminant model from an already generated "MultiWaveAnalysis".
Usage
## S3 method for class 'MultiWaveAnalysis'
trainModel(data, labels, method, ...)
Arguments
data |
A MultiWaveAnalysis object obtained with MultiWaveAnalysis function |
labels |
Labeled vector that classify the observations. |
method |
Selected method for discrimination. Valid options are "linear" and "quadratic" |
... |
Additional arguments |
Value
A discriminant model based on selected method. It can be an object of the class lda or qda.
See Also
Examples
load(system.file("extdata/ECGExample.rda",package = "TSEAL"))
MWA <- MultiWaveAnalysis(ECGExample, "d6", features = c("Var"))
MWADiscrim <- StepDiscrim(MWA, c(rep(1, 5), rep(2, 5)), 5,
features = c("Var")
)
model <- trainModel(MWADiscrim, c(rep(1, 5), rep(2, 5)), "linear")
[Package TSEAL version 0.1.3 Index]