train: Training process of a dbcsp object, using LDA classifier.

Description Usage Arguments Value See Also Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
train(
  object,
  selected_q = object@q,
  fold = object@fold,
  seed = object@seed,
  verbose = TRUE
)

## S4 method for signature 'dbcsp'
train(
  object,
  selected_q = object@q,
  fold = object@fold,
  seed = object@seed,
  verbose = TRUE
)

Arguments

object

object of class dbcsp.

selected_q

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

fold

integer value, by default fold=object@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=object@seed. Set a seed in case the results want to be replicable.

verbose

logical

Value

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

See Also

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

Examples

1
2
3
4
5
6
# 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)

dbcsp documentation built on July 9, 2021, 9:08 a.m.