Jump to content

User Reference:Normalizer

From BCI2000 Wiki
Revision as of 15:00, 4 April 2007 by Mellinger (talk | contribs)

Function

Normalizing Transform

The Normalizer applies a linear transformation to its input signal. For each channel, an offset value is subtracted, and the result multiplied with a gain value:

outputi=(inputiNormalizerOffseti)×NormalizerGaini

Adaptation

From the past statistics of its input, the Normalizer estimates offset and gain values adaptively to make its output signal

  • zero mean, and
  • unit variance.

The Normalizer uses data buffers to accumulate its past input according to user-defined rules. These rules are called buffer conditions because they are given in terms of boolean expressions. Each data buffer is associated with such a boolean expression. Whenever an expression evaluates to true, the current input will be appended to the associated buffer. Whenever it comes to updating offset and gain values, the Normalizer will use the content of its buffers to estimate data mean and variance.

Adaptation Rationale

Typical Use

Typically, the Normalizer's input is the output of a classifier, which it transforms into a zero mean/unit variance control signal which is then transmitted to an application module. Using the zero mean/unit variance property, an application module can then relate entities such as window size, screen update rate, cursor speed, and trial duration.

Parameters

For each channel of the Normalizer's input signal, adaptation is treated independently. Offsets, Gains, and Adaptation kind are represented as list parameters, with each entry in the list corresponding to a signal channel. Buffer configuration is done in matrix form, with columns corresponding to signal channels, and rows corresponding to multiple buffers.

NormalizerOffsets, NormalizerGains

Lists of offset and gain values, with entries corresponding to signal channels. These values will be updated depending on the channel's adaptation configuration in the Adaptation parameter.

Adaptation

A list of values that determines individual channels' adaptation strategy. Possible values are

  • 0 for no adaptation,
  • 1 for adjusting offsets to zero mean,
  • 2 for additionally adjusting gains to unit variance.

BufferConditions

A matrix consisting of boolean expressions. Expressions may involve States and the components of the Normalizer's input signal.

  • Each matrix entry represents a data buffer which is a ring buffer of length BufferLength. Whenever a buffer's expression evaluates to true, the current value of the input signal will be put into the buffer (overwriting past data once the buffer is filled).
  • Buffers in a certain column will buffer data from the corresponding signal channel, and will be used in adaptation of that channel only.
  • Within columns, the order of buffers does not affect computation.
  • Empty expressions do not have any effect on the computation. Thus, it is possible to have a different number of buffers for different channels.
  • A buffer to store data for the first target, and during feedback only, should have an expression such as (Feedback)&&(TargetCode==1).

BufferLength

The maximum length of each data buffer.

  • The length is specified in data blocks if given as a raw number, and in seconds if given as a number followed by the character "s".
  • All data buffers have the same capacity.
  • Once a data buffer is filled, its older entries will be replaced with new data (ring buffer).

UpdateTrigger

A boolean expressions that triggers adaptation when changing to true from false.

  • Generally, continuous adaptation within trials is not desired. Rather, one wants adaptation to occur at the end of a trial. This corresponds to expressions such as Feedback!=0 or TargetCode!=0.

States

Buffer condition expressions, and the UpdateTrigger expression may involve any State present in the system. Expressions are checked for syntactical correctness and whether states are present during the Preflight Phase.

Examples

Trial-based 1D Feedback Task with pre-defined Targets

Trial-based 2D Feedback Task with pre-defined Targets

Continuous 1D Control without pre-defined Targets


See also: User Reference:Expression Syntax