Jump to content

User Reference:Normalizer: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
No edit summary
 
Mellinger (talk | contribs)
No edit summary
Line 1: Line 1:
==Function==
==Function==
===Normalizing Transform===
The Normalizer applies a linear transformation to its input signal.
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:
For each channel, an offset value is subtracted, and the result multiplied with a gain value:
Line 14: Line 15:
Whenever it comes to updating offset and gain values, the Normalizer will use the content of its buffers to estimate data mean and variance.
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.
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.
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==
==Parameters==
For each channel, adaptation may be configured independently.
For each channel of the Normalizer's input signal, adaptation is treated independently.
  "Filtering floatlist NormalizerOffsets= 2 0 0 "
Offsets, Gains, and Adaptation kind are represented as list parameters, with each entry in the list corresponding to a signal channel.
    "0 % % // normalizer offsets",
Buffer configuration is done in matrix form, with columns corresponding to signal channels, and rows corresponding to multiple buffers.
  "Filtering floatlist NormalizerGains= 2 1 1 "
    "0 % % // normalizer gain values",


  "Filtering intlist Adaptation= 2 2 2 "
===NormalizerOffsets, NormalizerGains===
    "0 0 2 // 0: no adaptation, "
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.
            "1: zero mean, "
===Adaptation===
            "2: zero mean, unit variance "
A list of values that determines individual channels' adaptation strategy. Possible values are
            "(enumeration)",
*0 for no adaptation,
 
*1 for adjusting offsets to zero mean,
  "Filtering string UpdateTrigger= (Feedback==0) "
*2 for additionally adjusting gains to unit variance.
    "% % % // expression to trigger offset/gain update when changing from 0 "
===BufferConditions===
    "(use empty string for continuous update)",
A matrix consisting of [[User Reference:Expression Syntax|boolean expressions]].
 
Expressions may involve [[States]] and the components of the Normalizer's input signal.
  "Filtering matrix BufferConditions= 2 1 "
*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).
    "(Feedback)&&(TargetCode==1) "
*Buffers in a certain column will buffer data from the corresponding signal channel, and will be used in adaptation of that channel only.
    "(Feedback)&&(TargetCode==2) "
*Within columns, the order of buffers does not affect computation.
    "% % % // expressions corresponding to data buffers "
*Empty expressions do not have any effect on the computation. Thus, it is possible to have a different number of buffers for different channels.
    "(columns correspond to output channels, multiple rows correspond to"
*A buffer to store data for the first target, and during feedback only, should have an expression such as <code>(Feedback)&&(TargetCode==1)</code>.
    " multiple buffers)",
===BufferLength===
 
The maximum length of each data buffer.
  "Filtering float BufferLength= 9s 9s % % "
*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".
    "0 0 % // time window of past data per buffer that enters into statistic",
*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 [[User Reference:Expression Syntax|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 <code>Feedback!=0</code> or <code>TargetCode!=0</code>.


==States==
==States==
None.
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==
==Examples==
===Trial-based 1D Feedback Task with pre-defined Targets===
===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===
===Continuous 1D Control without pre-defined Targets===
----
See also: [[User Reference:Expression Syntax]]

Revision as of 15:00, 4 April 2007

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