time_series_source

Module: missions.nodes.source.time_series_source

Sources for windowed times series, e.g from streaming data

Inheritance diagram for pySPACE.missions.nodes.source.time_series_source:

Inheritance diagram of pySPACE.missions.nodes.source.time_series_source

Class Summary

TimeSeriesSourceNode(\*\*kwargs) Source for windowed TimeSeries saved in pickle format via TimeSeriesSinkNode
Stream2TimeSeriesSourceNode([...]) Transformation of streaming data to windowed time series
TimeSeries2TimeSeriesSourceNode(\*\*kwargs) Source for streamed time series data for later windowing

Classes

TimeSeriesSourceNode

class pySPACE.missions.nodes.source.time_series_source.TimeSeriesSourceNode(**kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Source for windowed TimeSeries saved in pickle format via TimeSeriesSinkNode

Parameters

Exemplary Call

- 
    node : TimeSeriesSource
Author:

Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)

Created:

2008/11/25

POSSIBLE NODE NAMES:
 
  • TimeSeriesSource
  • BCI_Competition_Source
  • Time_Series_Source
  • TimeSeriesSourceNode
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

__del__()
get_metadata(key) Return the value corresponding to the given key from the dataset meta data of this source node.
input_types
register_input_node(node) Register the given node as input
request_data_for_testing() Returns the data that can be used for testing of subsequent nodes
request_data_for_training(use_test_data) Returns the time windows that can be used for training of subsequent nodes
set_input_dataset(dataset) Sets the dataset from which this node reads the data
train_sweep(use_test_data) Performs the actual training of the node.
use_next_split() Use the next split of the data into training and test data.
input_types = ['TimeSeries']
__init__(**kwargs)[source]
set_input_dataset(dataset)[source]

Sets the dataset from which this node reads the data

register_input_node(node)[source]

Register the given node as input

use_next_split()[source]

Use the next split of the data into training and test data. Returns True if more splits are available, otherwise False.

This method is useful for benchmarking

train_sweep(use_test_data)[source]

Performs the actual training of the node. .. note:: Source nodes cannot be trained

request_data_for_training(use_test_data)[source]

Returns the time windows that can be used for training of subsequent nodes

request_data_for_testing()[source]

Returns the data that can be used for testing of subsequent nodes

get_metadata(key)[source]

Return the value corresponding to the given key from the dataset meta data of this source node.

__del__()[source]

Stream2TimeSeriesSourceNode

class pySPACE.missions.nodes.source.time_series_source.Stream2TimeSeriesSourceNode(windower_spec_file=None, local_window_conf=False, nullmarker_stride_ms=1000, no_overlap=False, continuous=False, data_consistency_check=False, **kwargs)[source]

Bases: pySPACE.missions.nodes.source.time_series_source.TimeSeriesSourceNode

Transformation of streaming data to windowed time series

This node contains an interfaces the streaming dataset to provide it with a windowing specification and then get a data generator. This is a main difference, since other source nodes, get access to the real data and generate a generator object.

For the segmentation of the data, the StreamDataset uses the MarkerWindower.

Parameters

windower_spec_file:
 

The specification file for the Windower containing information which data should be windowed and which data can be discarded.

For a detailed description look at the module description.

(recommended, default: windower.WindowFactory.default_windower_spec)

local_window_conf:
 

Can be set to True if the user wants to specify the location of the windower spec file manually. In the default situation, the spec file is looked up according to the location of the spec files. When set to True, the windower spec file can be specified with path (e.g. ‘/home/myuser/myspecs/mywindow.yaml’) or without path, which indicates that the window specs file is located in current local folder or the specification file folder of the node chain. For the parameterization of the windower configuration file, you should have a look at the documentation of the MarkerWindower

(optional, default: False)

nullmarker_stride_ms:
 

An integer to specify the interval of the null marker. The null marker is than inserted into the data stream every null_marker_stride_ms ms. This marker can be used to cut out sliding windows at a constant rate.

Either nullmarker_stride_ms or windower_spec_file should be specified!

(recommended, default: 1000)

no_overlap:

When having streamed windows, the last data point of the previous window might be the same as the one of the current window, since when using a fixed window size, first and last point of the window are normally used. This effect can be turned off with this parameter.

When a window spec file is given, the default is False. If not, the default is True.

(recommended, default: None)

data_consistency_check:
 

When True it will be checked if cut windows contain channels with zero standard deviation and the user will be informed.

(optional, default: False)

Exemplary Call

-
    node : Stream2TimeSeriesSourceNode
    parameters :
        windower_spec_file : "example_lrp_window_spec.yaml"
Author:

Johannes Teiwes (johannes.teiwes@dfki.de)

Created:

2010/10/12

LastChanges:

Mario Michael Krell

POSSIBLE NODE NAMES:
 
  • Stream2TimeSeriesSourceNode
  • Stream2TimeSeriesSource
  • EEG_Source
  • Offline_EEG_Source
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

__hyperparameters
get_source_file_name() Returns the file name of the source file
input_types
process() Returns a generator that yields all data received by the client
request_data_for_testing() Returns the data that can be used for testing of subsequent nodes
request_data_for_training(use_test_data) Returns the data that can be used for training of subsequent nodes
store_state(result_dir[, index]) Stores this node in the given directory result_dir
input_types = ['TimeSeries']
__init__(windower_spec_file=None, local_window_conf=False, nullmarker_stride_ms=1000, no_overlap=False, continuous=False, data_consistency_check=False, **kwargs)[source]
get_source_file_name()[source]

Returns the file name of the source file

process()[source]

Returns a generator that yields all data received by the client

This is helpful, when using this source node in online application, since for most other source nodes, request_data_for_testing() is used instead.

..todo:: check code

request_data_for_training(use_test_data)[source]

Returns the data that can be used for training of subsequent nodes

request_data_for_testing()[source]

Returns the data that can be used for testing of subsequent nodes

store_state(result_dir, index=None)[source]

Stores this node in the given directory result_dir

__hyperparameters = set([NoOptimizationParameter<local_window_conf>, NoOptimizationParameter<data_consistency_check>, NoOptimizationParameter<dtype>, NoOptimizationParameter<output_dim>, NoOptimizationParameter<kwargs_warning>, NoOptimizationParameter<retrain>, NoOptimizationParameter<input_dim>, NoOptimizationParameter<store>])

TimeSeries2TimeSeriesSourceNode

class pySPACE.missions.nodes.source.time_series_source.TimeSeries2TimeSeriesSourceNode(**kwargs)[source]

Bases: pySPACE.missions.nodes.source.time_series_source.Stream2TimeSeriesSourceNode

Source for streamed time series data for later windowing

Source node that interprets a stream of time series windows as raw data stream. The markers stored in marker_name attribute are used as the markers for a MarkerWindower.

This node pretends to be a Stream2TimeSeriesSourceNode but takes real time series data and interprets it as a stream.

Main functionality is implemented in the TimeSeriesDataset inspired by the StreamDataset

Parameters

windower_spec_file:
 

The specification file for the windower containing information which data should be windowed and which data can be discarded.

For a detailed description look at the module description.

...:For further parameters check the Stream2TimeSeriesSourceNode

Exemplary Call

-
    node: Time_Series_Stream_Source
    parameters :
        windower_spec_file : "example_lrp_window_spec.yaml"
Author:

Hendrik Woehrle (hendrik.woehrle@dfki.de)

Created:

2011/08/12

POSSIBLE NODE NAMES:
 
  • Time_Series_Stream_Source
  • TimeSeries2TimeSeriesSource
  • TimeSeriesStreamSource
  • TimeSeries2TimeSeriesSourceNode
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

get_source_file_name() Source file name is unknown or preprocessing specific
__init__(**kwargs)[source]
get_source_file_name()[source]

Source file name is unknown or preprocessing specific