P300 GUI Guide

From BCI2000 Wiki
Revision as of 18:51, 14 January 2009 by Sbriskin (talk | contribs)
Jump to: navigation, search


The P300 GUI (Graphical User Interface) can be used to train and test a linear classifier for detection of evoked potentials collected with BCI2000[6] and visualize the waveforms and classification results. It is designed for analysis of BCI2000 data collected using the P3Speller or P3AV paradigms. The program generates feature weights derived via various regression techniques. The specifics of the feature space and training routine can be manipulated using the GUI. The feature weights derived by the GUI can be saved and imported into BCI2000 as a parameter file fragment for online testing.

The GUI is capable of performing several functions independently:

  • Classifier Training: generates feature weights from BCI2000 P3Speller or P3AV data files (classifier weights can be saved and imported into BCI2000)
  • Classifier Testing: applies current or previously created feature weights to BCI2000 P3Speller or P3AV data files and compares the results
  • Visualizing evoked potentials from BCI2000 P3Speller or P3AV data files

The details and operation of each of these functions are described subsequently.

Using the GUI

Getting Started

System Requirements

  • MatLab 7 with the Statistics Toolbox and 1 GB of RAM is recommended

To Launch GUI

  1. Open Matlab and select the path containing the P300_GUI code.
    Launch GUI.png
  2. From the Matlab command window, type P300_GUI and press Enter. The P300_GUI control panel will appear.
    Figure 1: The GUI Control Panel[#'s] correspond to subsequent descriptions of function

Training Data Pane

[1] Select Training Data Button Use this button to load BCI2000 data files for training. The information for the selected files will appear below the button.
[2] Regression Method Selects the regression method used to derive feature weights. Select from SWLDA (Stepwise Linear Discriminant Analysis), Ordinary Least Squares Regression, and Logistic Regression.
[3] Resp. Window Used to specify the begin and end time points in milliseconds (ms) following the stimuli collected for the analysis. This automatically converted into samples according to the sampling rate of the data (rounded). Only a single data window can be entered and will be evaluated. Negative values are accepted and begin < end.
[4] % random sample Used to train on a sub-sample of the responses randomly selected from the training data. The default (100%) uses all of the data for training.
[5] Spatial Filter Pull-Down Menu Selects the spatial filter applied to the training data. Select 'RAW & CAR', 'RAW only', or 'CAR only' from the drop-down menu. RAW is no spatial filter applied to the data and CAR is a common average reference filter using all of the channels contained in the data file (not just the channels specified in the GUI channel set!!!). The RAW & CAR option will evaluate both types simultaneously for comparison purposes.
[6] Decimation Frequencies Used to specify the temporal decimation frequency of the data in Hz. Multiple values can be entered for simultaneous evaluation and comparison. Set to the sampling rate for no decimation. The lower the Decimation Frequency, the less original data retained for processing.
[7] Max model features Used to specify the maximum number of features to be kept in the SWLDA model (has no effect on the LG or LS regression options). Only a single value can be entered for evaluation.
[8] Channel Set 1 Used to specify the primary channel set that will be used to create feature weights. The specified channels must be a subset of the channels contained in the training data file.
[9] Channel Set 2 Used to specify a secondary channel set to evaluate simultaneously for comparison purposes. The specified channels must be a subset of the channels contained in the training data file. Can be enabled by clicking the check-box.
[10] Create Spreadsheet enable Used to create a Microsoft Excel spreadsheet that summarizes the classification results. Can be enabled by clicking the check-box. If enabled, a spreadsheet having the same name as the training set will be created in the directory of the training files. The results of the training classification will be located in the worksheet having the same name of the training set within the file. If no training file is used, the spreadsheet will use the name and location of the first test file. The results in the spreadsheet will be overwritten if an analysis is performed again using data from the same training set, therefore the spreadsheet should be manually renamed after analysis is complete to prevent accidental deletion of results.
[11] Generate Weights Use this button to generate the feature weights after properly configuring all of the above parameters. The generated weight file labels will appear in the MUD Files Pane and the classification results will appear in the Matlab command window and as figures.
[12] Create R2 Plots Use this button to visualize the training data. This can be performed independently of the weight generation.

Feature Weights Pane

MUD is BCI2000’s moniker for the feature weight matrix. As illustrated in Figure 1, *.mud files appear in the MUD Files Pane, numbered in order of simulation and having the following identifier: ‘ChS1CAR0DF20RS100SW’, where ChS1 indicates Channel Set 1, the value following CAR indicates whether a common average reference was used (0 no CAR used, 1 CAR used), the value following DF indicates the decimation factor, value following RS indicates the random sample value, and the final two characters indicate the regression method (SW: SWLDA, LS: least squares, or LG: logistic).