filter_windows¶
Module: missions.nodes.data_selection.filter_windows
¶
Filtering of windows based on the label
Inheritance diagram for pySPACE.missions.nodes.data_selection.filter_windows
:
Class Summary¶
FilterGenerator (generator[, caching, ...]) |
Generator object that performs the actual filtering of the windows. |
FilterWindowsNode ([trigger_event, ...]) |
Filter out the windows depending on their label. |
Classes¶
FilterGenerator
¶
-
class
pySPACE.missions.nodes.data_selection.filter_windows.
FilterGenerator
(generator, caching=False, trigger_event=None, activation_label=None, positive_event=None, negative_event=None, deactivation_label=None)[source]¶ Bases:
object
Generator object that performs the actual filtering of the windows.
Class Components Summary
_fetch_from_generator
()Fetches one fresh value from the generator, store it in the cache and yield it filter_windows
(value)Method that is called for the filtering process. fresh
()Return one generator that yields the same values like the internal one that was passed to __init__. -
__init__
(generator, caching=False, trigger_event=None, activation_label=None, positive_event=None, negative_event=None, deactivation_label=None)[source]¶ Stores the generator and creates an empty cache
Note
Since the output of the generator is ordered, the cache is an ordered sequence of variable length like a list
-
_fetch_from_generator
()[source]¶ Fetches one fresh value from the generator, store it in the cache and yield it
-
fresh
()[source]¶ Return one generator that yields the same values like the internal one that was passed to __init__.
Note
It does not recompute values that have already been requested before but just uses these from the internal cache.
Note
Calling fresh invalidates all existing generators that have been created before using this method, i.e. there can only be one generator at a time
-
__weakref__
¶ list of weak references to the object (if defined)
-
FilterWindowsNode
¶
-
class
pySPACE.missions.nodes.data_selection.filter_windows.
FilterWindowsNode
(trigger_event=None, activation_label=None, deactivation_label=None, positive_event=None, negative_event=None, use_test_data=True, **kwargs)[source]¶ Bases:
pySPACE.missions.nodes.base_node.BaseNode
Filter out the windows depending on their label.
The node inspects the label of the window and decides, based on the specified criteria and past events, if the window should be forwarded or ignored.
It is possible to use a simple switch on / switch off mechanism or more complex state-machine like filtering with triggers.
Parameters
activation_label: Start streaming windows after a window with this label.
(optional, default: None)
deactivation_label: Stop streaming windows after a window with this label.
(optional, default: None)
positive_event: Positive event for the state machine.
(optional, default: None)
negative_event: Negative event for the state machine.
(optional, default: None)
Exemplary Call
- node : FilterWindows parameters : deactivation_label : "Stop" activation_label : "Start"
Authors: Hendrik Woehrle (hendrik.woehrle@dfki.de)
Created: 2013/04/04
POSSIBLE NODE NAMES: - FilterWindows
- FilterWindowsNode
- Filter_Windows
POSSIBLE INPUT TYPES: - PredictionVector
- FeatureVector
- TimeSeries
Class Components Summary
input_types
request_data_for_testing
()Returns the data for testing of subsequent nodes request_data_for_training
(use_test_data)Returns the filtered data for training of subsequent nodes -
__init__
(trigger_event=None, activation_label=None, deactivation_label=None, positive_event=None, negative_event=None, use_test_data=True, **kwargs)[source]¶
-
request_data_for_training
(use_test_data)[source]¶ Returns the filtered data for training of subsequent nodes
-
input_types
= ['PredictionVector', 'FeatureVector', 'TimeSeries']¶