boxplot.dbcsp: Boxplot for dbcsp object

boxplot.dbcspR Documentation

Boxplot for dbcsp object

Description

This function plots the variance of the selected vectors in a boxplot.

Usage

## S3 method for class 'dbcsp'
boxplot(x, vectors=1, pairs=TRUE, ordered_pairs=TRUE, show_log=TRUE,...)

Arguments

x

object of class dbcsp.

vectors

integer or array of integers, indicating the index of the projected vectors to plot, by default vectors=1.

pairs

logical, if TRUE the pairs of the indicated vectors are also shown, by default pairs=TRUE.

ordered_pairs

logical, if TRUE the pairs are plotted next to each other, else pairs are plotted at the end, by default ordered_pairs=TRUE.

show_log

logical, if TRUE the logarithms of the variances are displayed, else the variances are displayed, by default show_log=TRUE.

...

not currently used.

Details

A boxplot with the variances of the selected vectors. Vectors values must lie between 1 and 2*q, being q the number of dimensions used to perform the DB-CSP algorithm when creating the dbcsp object. The following should be taken into account when plotting:

  • The first q values (1,...,q) are indicated as a1...aq

  • The last q values (q+1,...,2*q) are indicated as b1...bq.

If pairs=TRUE, it is recommended that vectors<q for better understanding, since their pairs are plotted as well. In case that vectors>q, it should be noted that the values are displayed from b1 to bq, where b1 and bq represent q+1 vector and 2*q vector, respectively.

For example if q=15 and boxplot(object, vectors=16, pairs=FALSE), b1 (16-q=1) vector is shown.

Among the selected boxplots, the largest whiskers are obtained and just the outliers within these whiskers are shown, the rest are not displayed. With the outliers which are outside the whiskers it is not possible to get a good visualization.

Value

Displays the boxplot of the variances of the selected vectors.

See Also

dbcsp, print, summary, train, selectQ, predict, plot

Examples

# Read data from 2 classes
x <- AR.data$come
y <- AR.data$five
mydbcsp <- new("dbcsp", X1 = x, X2 = y)
boxplot(mydbcsp)
boxplot(mydbcsp,vectors=1:4,pairs=FALSE)
boxplot(mydbcsp, vectors=c(1,4,7),ordered_pairs=FALSE)

dbcsp documentation built on June 30, 2022, 5:05 p.m.