frequency_features

Module: missions.nodes.feature_generation.frequency_features

Extract frequency properties like band powers

Known issues:No unit tests!

Inheritance diagram for pySPACE.missions.nodes.feature_generation.frequency_features:

Inheritance diagram of pySPACE.missions.nodes.feature_generation.frequency_features

Class Summary

STFTFeaturesNode([frequency_band, ...]) Extract features based on the Short-term Fourier Transform
FrequencyBandFeatureNode(frequency_bands[, ...]) Extract features based on the Frequency-band power

Classes

STFTFeaturesNode

class pySPACE.missions.nodes.feature_generation.frequency_features.STFTFeaturesNode(frequency_band=None, frequency_resolution=None, *args, **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Extract features based on the Short-term Fourier Transform

This node converts the signal into the frequency domain using the Short-term Fourier transform. The power of certain cells of the STFT (i.e. the power in a frequency band in a certain time interval) are returned as features.

Parameters

frequency_band:

The frequency band which is used to extract features from the spectrogram. If this parameter is not specified (None), the complete frequency range (-inf,+inf) is used.

(optional, default: None)

frequency_resolution:
 

The desired frequency resolution of the spectrogram, i.e. the smallest distance between two frequencies being distinguishable. Increasing the frequency resolution decreases the time resolution. .. note:: frequency_resolution << sampling_frequency

Exemplary Call

-
    node : STFT_Features
    parameters :
        frequency_band : [0.4,3.5]
        frequency_resolution : 1.0
Author:

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

Created:

2009/03/09

POSSIBLE NODE NAMES:
 
  • STFTFeaturesNode
  • STFT_Features
  • STFTFeatures
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

_execute(x) Extract the Fourier features from the given data x
input_types
__init__(frequency_band=None, frequency_resolution=None, *args, **kwargs)[source]
_execute(x)[source]

Extract the Fourier features from the given data x

input_types = ['TimeSeries']

FrequencyBandFeatureNode

class pySPACE.missions.nodes.feature_generation.frequency_features.FrequencyBandFeatureNode(frequency_bands, criterion='max', *args, **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Extract features based on the Frequency-band power

This node computes the power contained in certain frequency bands. For this, the STFT is used to compute a spectrogram and the power of the cells within the specified frequency band are summed to obtain the power of the frequency band in the respective time bin. Different criteria can be given to specify how features are derived from the change of band power over time.

Parameters

frequency_bands:
 

A list of tuple. The frequency bands whose band power is used as feature.

criterion:

An criterion that specifies how the change of band power over time is used to create a feature: One of the following Strings is valid:

  • “max” - returns the maximum power in the band over time
  • “min” - returns the minimum power in the band over time
  • “median” - returns the median power in the band over time
  • “max_change” - returns the maximum minus the minimum power in
    the band over time
  • “all” - returns all powers in the band over time as single
    features

(Optional, default: “max”)

Exemplary Call

-
    node : Frequency_Band_Features
    parameters :
        frequency_bands: '[(7.0, 10.0), (13.0,26.0)]'
        criterion : "all"
Author:

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

Created:

2009/03/09

POSSIBLE NODE NAMES:
 
  • FrequencyBandFeature
  • Frequency_Band_Features
  • FrequencyBandFeatureNode
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

_execute(x) Extract the Fourier features from the given data x
input_types
__init__(frequency_bands, criterion='max', *args, **kwargs)[source]
_execute(x)[source]

Extract the Fourier features from the given data x

input_types = ['TimeSeries']