powered by
This function applies DB-CSP to the instances and perform the training of a Linear Discriminant Analysis (LDA) classifier using the object data.
# S3 method for dbcsp train(x, selected_q=x@q, fold=x@fold, seed=x@seed, verbose=TRUE,...)
The dbcsp object with the training results saved as list in x@out:
dbcsp
x@out
vectors The projection vectors obtained after applying CSP.
vectors
eig The eigenvalues obtained after applying CSP.
eig
proy The variance values of the projected signals obtained after applying CSP.
proy
acc The mean accuracy value obtained for training data applying cross validation.
acc
used_folds List of the folds used in the cross validation.
used_folds
folds_acc Accuracy values for each of the folds of the cross validation.
folds_acc
model The trained LDA classifier.
model
selected_q The number of vectors used when training.
selected_q
object of class dbcsp.
integer value indicating the number of vectors to use when training the model, by default selected_q=x@q.
selected_q=x@q
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.
fold=x@fold
fold==1
numeric value, by default fold=x@seed. Set a seed to ensure reproducible results.
fold=x@seed
logical
not currently used.
dbcsp, print, summary, selectQ, predict, plot, boxplot
print
summary
selectQ
predict
plot
boxplot
# 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)
Run the code above in your browser using DataLab