train.dbcsp {dbcsp}R Documentation

Training process of a dbcsp object, using LDA classifier.

Description

This function applies DB-CSP to the instances and perform the training of a Linear Discriminant Analysis (LDA) classifier using the object data.

Usage

## S3 method for class 'dbcsp'
train(x, selected_q=x@q, fold=x@fold, seed=x@seed, verbose=TRUE,...)

Arguments

x

object of class dbcsp.

selected_q

integer value indicating the number of vectors to use when training the model, by default selected_q=x@q.

fold

integer value, by default fold=x@fold. It controls the number of partitions. If fold==1 a train/test split is performed, with p=0.2 for test indices.

seed

numeric value, by default fold=x@seed. Set a seed to ensure reproducible results.

verbose

logical

...

not currently used.

Value

The dbcsp object with the training results saved as list in x@out:

See Also

dbcsp, print, summary, selectQ, predict, plot, boxplot

Examples

# Read data from 2 classes
x <- AR.data$come[1:20]
y <- AR.data$five[1:20]
mydbcsp <- new("dbcsp", X1 = x, X2 = y)
mydbcsp <- train(mydbcsp,fold=3)
print(mydbcsp@out$acc)

[Package dbcsp version 0.0.2.1 Index]