Description Usage Arguments Author(s) References See Also Examples
This function was designed to do different types of plots of EEG data. Graphs of the original data, of the spectrum, continuous wavelet transform and t-value scalogram of the signals can be plotted. The main idea is to help the user to find nice features to use in his final model.
1 2 3 |
data |
is the data frame containing the EEG signals. The data frame must be organized as follows: each column represents a different channel. Thus, the signals collected by each channel are represented in each row. To identify the class and recording represented by each line, the vectors |
classes.Id |
is a vector with length equal to the number of rows in |
rec.Id |
is a vector with length equal to the number of rows in |
which.classes |
a vector representing which classes will be plotted. For example, if |
which.rec |
a list representing which recordings shall be plotted for each class. For example, if |
which.channels |
a vector representing which channels shall be plotted. For example, if |
type |
if |
m.a |
is the moving average parameter, if |
n.colors |
is the number of colors for the contour plot. Used if |
wavelet |
if |
abs |
if TRUE then the absolute value of the continuous wavelet transform matrix is used. Used if |
Real |
if TRUE takes the real part of the continuous wavelet transform matrix, if FALSE takes the imaginary part. Used if |
variance |
the variance parameter for the continuous wavelet transform. See |
Murilo Coutinho Silva (coutinho.stat@gmail.com), George Freitas von Borries
Bostanov, V. (2004) BCI Competition 2003 - Data Sets Ib and IIb: Feature Extraction From Event-Related Brain Potentials With the Continuous Wavelet Transform and the t-Value Scalogram. IEEE transactions on biomedical engineering, V. 51, no. 6.
Hastie, T., Tibshirani, R., Friedman, J. (2009) The Elements of Statistical Learning: Data Mining, Inference, and Prediction. 2nd ed. Stanford: Springer.
Brockwell, P.J., Davis, R.A. (2002) Introduction to Time Series and Forecasting. 2nd ed. Colorado: Springer. Cap. 4.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | library(eegAnalysis)
#### Simulating some data
sim<-randEEG()
#### Plot some of the recordings:
plotEEG(sim$data, sim$classes.Id, sim$rec.Id, which.classes = "ALL",
which.rec=list(c(1,2,3),c(2,3,4)), which.channels=c(1,2,3),
type = 'original', m.a = 10)
#### Plot the spectrum
plotEEG(sim$data, sim$classes.Id, sim$rec.Id, which.classes = "ALL",
which.rec="ALL", which.channels=1, type = 'spectrum', m.a = 10)
#### Plot the spectrum
plotEEG(sim$data, sim$classes.Id, sim$rec.Id, which.classes = "ALL",
which.rec="ALL", which.channels=5, type = 'spectrum', m.a = c(5,20))
#### Plot the continuous wavelet transform
plotEEG(sim$data, sim$classes.Id, sim$rec.Id, which.classes = 1,
which.rec=list(c(1)), which.channels=c(2), type = 'wavelet',
wavelet="gaussian2", abs=TRUE,variance=1)
### Plot the T-value scalogram
plotEEG(sim$data, sim$classes.Id, sim$rec.Id, which.classes = "ALL",
which.rec="ALL", which.channels=c(2), type = 'T.pvalue',
wavelet="gaussian2", abs=TRUE,variance=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.