PCA compression

This function compresses data to n-dimensions using principal component analysis (singular value decomposition) as advocated in the following papers:

In these papers, PCA compression is run before EDM and PCA suppression respectively.

Example of output from PCA compression. Data were compressed from 60 to 30 dimensions.

EEGLAB user interface

1. Enter the number of dimensions to reduce the data by.

2. Turn on/off a plot which summarises the variance of each principal component before and after compression.

Scripts

Base function

EEG = tesa_pcacompress( EEG ); Default use.

EEG = tesa_pcacompress( EEG , 'key1', value1...); Custom inputs.

Pop function

EEG = pop_tesa_pcacompress( EEG ); Pop up window.

EEG = pop_tesa_pcacompress( EEG , 'key1', value1...); Custom inputs.

Required inputs

Input

Description

Example

Default

EEG

EEGLAB EEG structure

EEG

-

Optional inputs (key/value pairs)

Key

Input value

Description

Example

Default

'compVal'

integer

Integer describes the number of components to reduce the data to.

40

30

'plot'

'on' or 'off'

Turns on/off plot summarising the variance explained by principal components.

'off'

'on'

Outputs

Output

Description

EEG

EEGLAB EEG structure

Examples

EEG = pop_tesa_pcacompress( EEG, 'compVal', 40 ); Compress to top 40 dimensions.

EEG = pop_tesa_pcacompress( EEG, 'plot','off' ); Turns off summary plot.

Last updated