# Summary

- Plugin name : Epoch variance
- Version : 1.0
- Author : Dieter Devlaminck
- Company : INRIA
- Short description : Computes variance of each sample over several epochs
- Documentation template generation date : Dec 30 2016

# Description

This box is an extension of the Epoch Average box. It offers several methods of averaging for epoched streams but also outputs variance and confidence bounds.

# Inputs

The input type of this box can be changed. Its type must be derived of type Doc_Streams_StreamedMatrix in order to be parsed by the input reader. If the author changes the input type, the output type will be changed the same way.

## 1. Input epochs

This input receives the input streamed matrix to average.

- Type identifier : Streamed matrix
*(0x544a003e, 0x6dcba5f6)*

# Outputs

The output type of this box can be changed. Its type must be derived of type Doc_Streams_StreamedMatrix in order for the writer to format the output chunks. If the author changes the output type, the input type will be changed the same way.

## 1. Averaged epochs

This output sends the averaged streamed matrix. Averaging method is done according to the box settings.

- Type identifier : Streamed matrix
*(0x544a003e, 0x6dcba5f6)*

## 2. Variance of epochs

This output sends the variance of the input. Averaging method is done according to the box settings.

- Type identifier : Streamed matrix
*(0x544a003e, 0x6dcba5f6)*

## 3. Confidence bounds

This output sends the confidence bounds of the input. Averaging method is done according to the box settings.

- Type identifier : Streamed matrix
*(0x544a003e, 0x6dcba5f6)*

# Settings

## 1. Averaging type

This setting gives the method to use in order to average the input matrices. It can be of two types :

*Moving average*: in this case, the averaging is done at every input reception on the last few buffers, starting as soon as enough input has been received.*Moving average (Immediate)*: in this case, the averaging is done at every input reception on the last few buffers, starting immediately. When the number of received buffer is lower than the wished number of epochs, the average is computed on this very few number of input buffers.*Epoch block average*: in this case, the averaging is done on a number of epochs (see next setting). Once this exact number of input is received, the average is computed and output.*Cumulative average*: in this case, the averaging is done on an infinite number of epochs starting from the first received buffer to the last received buffer. This can be**very**memory consuming !

Type identifier : * Epoch Average method (0x6530bdb1, 0xd057bbfe)*

- Default value : [
*Moving epoch average*]

## 2. Epoch count

This setting tells the box how much buffer it should use in order to compute the average.

- Type identifier :
*Integer (0x007deef9, 0x2f3e95c6)* - Default value : [
*4*]

## 3. Significance level

Significance Level for the confidence bound computation. The higher it is, the tighter the confidence interval will be.

- Type identifier :
*Float (0x512a166f, 0x5c3ef83f)* - Default value : [
*0.01*]

# Examples

Let's study two cases. First, suppose you have such box with *Epoch block average* set and *four* epochs. The input stream is as follows :

+----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ | I1 | | I2 | | I3 | | I4 | | I5 | | I6 | | I7 | | I8 | | I9 | ... +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+

The output stream will look like this :

+----+ +----+ | O1 | | O2 | ... +----+ +----+

where `O1`

is the average of `I1`

, `I2`

, `I3`

and `I4`

and where `O2`

is the average of `I5`

, `I6`

, `I7`

and `I8`

.

Now consider the case where you configured this box with *Moving average* and *four* epochs. Given the same input stream :

+----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ | I1 | | I2 | | I3 | | I4 | | I5 | | I6 | | I7 | | I8 | | I9 | ... +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+

The output stream will look like this :

+----+ +----+ +----+ +----+ +----+ +----+ | O1 | | O2 | | O3 | | O4 | | O5 | | O6 | ... +----+ +----+ +----+ +----+ +----+ +----+

where :

`O1`

is the average of`I1`

,`I2`

,`I3`

and`I4`

`O2`

is the average of`I2`

,`I3`

,`I4`

and`I5`

`O3`

is the average of`I3`

,`I4`

,`I5`

and`I6`

`O4`

is the average of`I4`

,`I5`

,`I6`

and`I7`

- etc...

Again consider the case where you configured this box with *Moving average (Immediate)* and *four* epochs. Given the same input stream :

+----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ | I1 | | I2 | | I3 | | I4 | | I5 | | I6 | | I7 | | I8 | | I9 | ... +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+

The output stream will look like this :

+----+ +----+ +----+ +----+ +----+ +----+ | O1 | | O2 | | O3 | | O4 | | O5 | | O6 | ... +----+ +----+ +----+ +----+ +----+ +----+

where :

`O1`

is exactly`I1`

`O2`

is the average of`I1`

and`I2`

`O3`

is the average of`I1`

,`I2`

and`I3`

`O4`

is the average of`I1`

,`I2`

,`I3`

and`I4`

`O5`

is the average of`I2`

,`I3`

,`I4`

and`I5`

`O6`

is the average of`I3`

,`I4`

,`I5`

and`I6`

- etc...

Finally consider the case where you configured this box with *Cumulative average* and *four* epochs. Given the same input stream :

The output stream will look like this :

+----+ +----+ +----+ +----+ +----+ +----+ | O1 | | O2 | | O3 | | O4 | | O5 | | O6 | ... +----+ +----+ +----+ +----+ +----+ +----+

where :

`O1`

is exactly`I1`

`O2`

is the average of`I1`

and`I2`

`O3`

is the average of`I1`

,`I2`

and`I3`

`O4`

is the average of`I1`

,`I2`

,`I3`

and`I4`

`O5`

is the average of`I1`

,`I2`

,`I3`

,`I4`

, and`I5`

`O6`

is the average of`I1`

,`I2`

,`I3`

,`I4`

,`I5`

, and`I6`

- etc...

# Miscellaneous

Generated on Tue Jun 26 2012 15:25:54 for Documentation by 1.7.4