# \donttest{
load(system.file("extdata/ECGExample.rda",package = "TSEAL"))
# The dataset has the first 5 elements of class 1
# and the last 5 of class 2.
labels <- c(rep(1, 5), rep(2, 5))
MWA <- generateStepDiscrim(ECGExample, labels, "haar", maxvars = 5, features = c("var"))
aux <- extractSubset(MWA, c(1, 2, 9, 10))
MWATest <- aux[[1]]
MWATrain <- aux[[2]]
ldaDiscriminant <- trainModel(MWATrain, labels[3:8], "linear")
CM <- testModel(ldaDiscriminant, MWATest, labels[c(1, 2, 9, 10)])
# }
Run the code above in your browser using DataLab