ssnr_sink

Module: missions.nodes.sink.ssnr_sink

Sink-Node for the Signal-to-Signal-Plus-Noise Ratio.

Inheritance diagram for pySPACE.missions.nodes.sink.ssnr_sink:

Inheritance diagram of pySPACE.missions.nodes.sink.ssnr_sink

Class Summary

SSNR(erp_class_label[, retained_channels]) Helper-class that encapsulates SSNR related computations.
SSNRSinkNode(erp_class_label[, ...]) Sink node that collects SSNR metrics in actual and virtual sensor space.

Classes

SSNR

class pySPACE.missions.nodes.sink.ssnr_sink.SSNR(erp_class_label, retained_channels=None)[source]

Bases: object

Helper-class that encapsulates SSNR related computations.

Use as follows: add training examples one-by-one along with their labels using the method add_example. Once all training data has been added, metrics values can be computed using ssnr_as, ssnr_vs, and ssnr_vs_test

Class Components Summary

_compute_Sigma(X, D)
_compute_xDAWN_filters(X, D)
_ssnr(v, Sigma_1, Sigma_X)
add_example(data, label) Add the example data for class label.
ssnr_as([selected_electrodes]) SSNR for given electrode selection in actual sensor space.
ssnr_vs([selected_electrodes]) SSNR for given electrode selection in virtual sensor space.
ssnr_vs_test(X_test, D_test[, ...]) SSNR for given electrode selection in virtual sensor space.
__init__(erp_class_label, retained_channels=None)[source]
add_example(data, label)[source]

Add the example data for class label.

ssnr_as(selected_electrodes=None)[source]

SSNR for given electrode selection in actual sensor space.

If no electrode selection is given, the SSNR of all electrodes is computed.

ssnr_vs(selected_electrodes=None)[source]

SSNR for given electrode selection in virtual sensor space.

If no electrode selection is given, the SSNR of all electrodes is computed.

ssnr_vs_test(X_test, D_test, selected_electrodes=None)[source]

SSNR for given electrode selection in virtual sensor space.

Note that the training of the xDAWN spatial filter for mapping to virtual sensor space and the computation of the SSNR in this virtual sensor space are done on different data sets.

If no electrode selection is given, the SSNR of all electrodes is computed.

_compute_Sigma(X, D)[source]
_ssnr(v, Sigma_1, Sigma_X)[source]
_compute_xDAWN_filters(X, D)[source]
__weakref__

list of weak references to the object (if defined)

SSNRSinkNode

class pySPACE.missions.nodes.sink.ssnr_sink.SSNRSinkNode(erp_class_label, retained_channels=None)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Sink node that collects SSNR metrics in actual and virtual sensor space.

This sink node computes metrics based on the signal to signal-plus-noise ratio (SSNR). It computes the SSNR both in actual sensor space (ssnr_as) and virtual sensor space (ssnr_vs). For virtual sensor space, it computes additionally the SSNR on unseen test data (if available), meaning that the mapping to virtual sensor space is computed on training data and the SSNR is computed on test data that was not used for learning this mapping.

Parameters
erp_class_label:
 

Label of the class for which an ERP should be evoked. For instance “Target” for a P300 oddball paradigm.

retained_channels:
 

The number of channels that are retained after xDAWN-based spatial filtering. The SSNR is computed in the virtual sensor space consisting of these retained channels. This quantity is only relevant for the SSNR metrics that are computed in the virtual sensor space. If this quantity is not defined, all channels are retained.

(optional, default: None)

Exemplary Call

-
    node : SSNR_Sink
    parameters :
          erp_class_label : "Target"
          retained_channels : 8
Author:Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)
Created:2011/11/14
POSSIBLE NODE NAMES:
 
  • SSNR_Sink
  • SSNRSink
  • SSNRSinkNode
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

_execute(data)
_stop_training()
_train(data, label)
get_result_dataset() Return the result collection with the results of this node.
input_types
is_supervised() Return whether this node requires supervised training.
is_trainable() Return whether this node is trainable.
process_current_split()
reset() Reset the node to the clean state it had after its initialization
input_types = ['TimeSeries']
__init__(erp_class_label, retained_channels=None)[source]
reset()[source]

Reset the node to the clean state it had after its initialization

is_trainable()[source]

Return whether this node is trainable.

is_supervised()[source]

Return whether this node requires supervised training.

_train(data, label)[source]
_stop_training()[source]
_execute(data)[source]
process_current_split()[source]
get_result_dataset()[source]

Return the result collection with the results of this node.