wavelet

Module: missions.nodes.feature_generation.wavelet

Generate features based on wavelet transformation

Note

Currently there is only a simple wrapper around pywt http://www.pybytes.com/pywavelets/ So one has to install this package. Scipy does not seem to give a real support for wavelets.

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

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

PywtWaveletNode

class pySPACE.missions.nodes.feature_generation.wavelet.PywtWaveletNode(wavelet=None, mode='sym', *args, **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Extract features based on the discrete wavelet transform from pywavelets

The components of the wavelet transform are returned as new features.

Note

This node is only a wrapper around the pywavelet package (http://www.pybytes.com/pywavelets/)

Parameters

wavelet:

Name of the wanted wavelet, including the number of taps

The pywt documentation currently names the following possibilities:

:haar family: haar
:db family:   db1, db2, db3, db4, db5, db6, db7, db8, db9, db10,
              db11, db12, db13, db14, db15, db16, db17, db18,
              db19, db20
:sym family:  sym2, sym3, sym4, sym5, sym6, sym7, sym8, sym9,
              sym10, sym11, sym12, sym13, sym14, sym15, sym16,
              sym17, sym18, sym19, sym20
:coif family: coif1, coif2, coif3, coif4, coif5
:bior family: bior1.1, bior1.3, bior1.5, bior2.2, bior2.4,
              bior2.6, bior2.8, bior3.1, bior3.3, bior3.5,
              bior3.7, bior3.9, bior4.4, bior5.5, bior6.8
:rbio family: rbio1.1, rbio1.3, rbio1.5, rbio2.2, rbio2.4,
              rbio2.6, rbio2.8, rbio3.1, rbio3.3, rbio3.5,
              rbio3.7, rbio3.9, rbio4.4, rbio5.5, rbio6.8
:dmey family: dmey

which refer to Haar, Daubechies, Symlets, Coiflets, Biorthogonal, Reverse biorthogonal and Discrete Meyer wavelets being used to transform the time series.

(recommended, default: ‘haar’)

mode:

One of the pywt extension modes:

['zpd', 'cpd', 'sym', 'ppd', 'sp1', 'per']

which mean zero, constant, symmetric, periodic and smooth padding and periodization. The latter uses the minimum number of coefficients in comparison to periodic padding.

(optional, default: ‘sym’)

Exemplary Call

-
    node : DWT
    parameters :
        mode : 'cpd'
        wavelet: 'haar'
Input:

TimeSeries

Output:

FeatureVector

Requires:

pywavelets

Author:

Mario Michael Krell (mario.krell@dfki.de)

Created:

2012/12/04

POSSIBLE NODE NAMES:
 
  • PywtWaveletNode
  • PywtWavelet
  • DWT
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

_execute(x) Extract the wavelet features from the given data x
input_types
__init__(wavelet=None, mode='sym', *args, **kwargs)[source]
_execute(x)[source]

Extract the wavelet features from the given data x

The feature names will get an A for approximation and D for details coefficients. So on example name is: Waveletname_Channelname_DetailsIndex, where index is the position of the coefficient in the transformed list. Details is A or D. Each channel is processed separately and its name is used in channelname.

input_types = ['TimeSeries']