#include "averaging.h"
#include "clustering.h"
#include "eeg.h"
#include "linalg.h"
Go to the source code of this file.
Functions | |
Array * | average_example (const Array *data, uint idx[2], double weights[2], OptArgList *optargs) |
example function to pass as SignalAverageFunction doing a pointwise average. | |
Array * | average_warpmarkers (const Array *data, uint idx[2], double weights[2], OptArgList *optargs) |
EEG * | eeg_simple_average (const EEG *eeg) |
Array * | hierarchical_average (const Array *data, const Array *distmat, SignalAverageFunction avgfct, OptArgList *optargs) |
Calculate a hierarchical average based on a cluster-analysis. |
STATUS: stable Averaging functions.
Definition in file averaging.c.
Array* average_example | ( | const Array * | data, | |
uint | idx[2], | |||
double | weights[2], | |||
OptArgList * | optargs | |||
) |
example function to pass as SignalAverageFunction doing a pointwise average.
This function is only for testing purposes. The "hierarchically" computed pointwise average should be the same as the normal average.
input | data (N x C x n) | |
index | average data[idx[0]] and data[idx[1]] | |
weights | number of trials "behind" each average | |
optional | arguments |
Definition at line 40 of file averaging.c.
Array* average_warpmarkers | ( | const Array * | data, | |
uint | idx[2], | |||
double | weights[2], | |||
OptArgList * | optargs | |||
) |
Definition at line 61 of file averaging.c.
Calculate a simple, pointwise average across trials
eeg | input |
Definition at line 189 of file averaging.c.
Array* hierarchical_average | ( | const Array * | data, | |
const Array * | distmat, | |||
SignalAverageFunction | avgfct, | |||
OptArgList * | optargs | |||
) |
Calculate a hierarchical average based on a cluster-analysis.
The data is average based on the first dimension of the data. I.e., the output is C x n dimensional.
A cluster analysis is carried out using the distance-matrix and the resulting dendrogram is followed to average two trials at a time:
The averaging uses a callback-function to calculate the average of two signals at a time. This function must be passed by the use of a SignalAverageFunction .
data | 2D or 3D double-array containing:
| |
distmat | a distance matrix (N x N) given distances between trials in data | |
avgfct | a callback-function to calculate the average of two Cxn signals at a time | |
optargs | may contain:
|
Definition at line 92 of file averaging.c.