channel_selection¶
Module: missions.nodes.spatial_filtering.channel_selection
¶
Select a subset of concrete specified channels
Inheritance diagram for pySPACE.missions.nodes.spatial_filtering.channel_selection
:
Class Summary¶
ChannelNameSelectorNode (selected_channels[, ...]) |
Project onto a subset of channels based on their name |
ConstantChannelCleanupNode (\*\*kwargs) |
Remove channels that contain invalid(e.g. |
Classes¶
ChannelNameSelectorNode
¶
-
class
pySPACE.missions.nodes.spatial_filtering.channel_selection.
ChannelNameSelectorNode
(selected_channels, inverse=False, **kwargs)[source]¶ Bases:
pySPACE.missions.nodes.base_node.BaseNode
Project onto a subset of channels based on their name
This node reduces the number of channels of the signal by projecting onto a subset of channels that are selected explicitly by the user via their name.
- Parameters
selected_channels: List of the names of the selected channels that will be retained (if inverse = False), otherwise the number of channels that are removed
inverse: Determines whether selected_channels are the channels that are retained (inverse=False) or the channels that are removed (inverse=True).
(optional, default: False)
load_path: Advanced: If a load_path is passed, the channel names can be read from a file. The path may contain the keywords __RUN__ and __SPLIT__. These will be replaced by the corresponding values at runtime (the Keyword __INPUT_DATASET__ can also be used). If this option is used, do NOT specify any channels in the selected_channels parameter. Instead, pass an integer n. The first n channels from the file will then be used. Pass None to use all channels from the file.
(optional, default: None)
Exemplary Call
- node : ChannelNameSelector parameters: selected_channels : ["TP7", "TP8"] inverse : True
Author: Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)
Created: 2009/03/18
POSSIBLE NODE NAMES: - ChannelNameSelectorNode
- ChannelNameSelector
- Channel_Name_Selector
- CNS
POSSIBLE INPUT TYPES: - TimeSeries
Class Components Summary
_execute
(data[, n])compute_retained_channel_indices
(data)Determine the indices of the selected channels by their names input_types
project_data
(data)Project the data set on to the channels that will be retained -
compute_retained_channel_indices
(data)[source]¶ Determine the indices of the selected channels by their names
-
input_types
= ['TimeSeries']¶
ConstantChannelCleanupNode
¶
-
class
pySPACE.missions.nodes.spatial_filtering.channel_selection.
ConstantChannelCleanupNode
(**kwargs)[source]¶ Bases:
pySPACE.missions.nodes.spatial_filtering.channel_selection.ChannelNameSelectorNode
Remove channels that contain invalid(e.g. None or string values
This node is used to clean up messy data that does not conform to the standards. This might happen if part of the data comes under string form or if the data columns are just empty. The node also removes the channels that have constant values.
Since the node inherits the execute method from the
ChannelNameSelector
, it is only necessary to populate the list of excluded nodes in the training phase.Exemplary Call
- node : CCC
Author: Mario Michael Krell, Andrei Ignat
Created: 2014/08/15
POSSIBLE NODE NAMES: - ConstantChannelCleanupNode
- ConstantChannelCleanup
- CCC
POSSIBLE INPUT TYPES: - TimeSeries
Class Components Summary
_stop_training
(\*\*kwargs)log the names of the excluded channels _train
(data)Check which channels have constant values. input_types
is_supervised
()No supervision is necessary since only the numerical values are considered. is_trainable
()The node invalidates the constant channels in the training phase. -
input_types
= ['TimeSeries']¶
-
is_trainable
()[source]¶ The node invalidates the constant channels in the training phase. As such, the node is trainable.
-
is_supervised
()[source]¶ No supervision is necessary since only the numerical values are considered.
-
_train
(data)[source]¶ Check which channels have constant values.
The training data is considered and the invalid channel names are removed. The first data entry is saved and the starting assumption is that all channels have constant values. When a value different from the first data entry for a respective channel is found, that channel is removed from the list of channels that have constant values.