Wavelet decomposition on irregularly sampled time series data

166 views
Skip to first unread message

Iman

unread,
Feb 18, 2022, 4:27:57 PM2/18/22
to PyWavelets
Hi,
Is there a way to apply wavelet decomposition (wavedec method in this package) to irregularly sampled time series data?

Matthew Thompson

unread,
Apr 20, 2023, 8:08:24 PM4/20/23
to PyWavelets
In theory you can - basically you are sliding the wavelet over the function in time. You would have to write custom code that would account for the time intervals between samples.

In practice I would recommend converting your irregular time series to a regularly-spaced time series by imputing values. There are a lot of different interpolation methods - the simplest is linear but you can use b-splines and other methods depending on what your data is like.

Deepu

unread,
May 22, 2023, 1:56:50 AM5/22/23
to PyWavelets
The `wavedec` method in the `pywt` package operates on regularly sampled time series data. It assumes that the time intervals between successive data points are equal. However, if you have irregularly sampled time series data, where the time intervals between data points are not constant, you need to preprocess the data before applying the wavelet decomposition.

Here's a general approach to applying wavelet decomposition to irregularly sampled time series data:

1. Resample the data: To make the time intervals between data points equal, you can resample the irregularly sampled data using interpolation techniques. There are various resampling methods available, such as linear interpolation, cubic interpolation, or using specialized interpolation methods designed for irregularly sampled data.

2. Apply wavelet decomposition: Once you have resampled the time series data, you can then apply the `wavedec` method from `pywt` as usual to obtain the wavelet coefficients at different levels of decomposition.

3. Handle missing data: If your irregularly sampled time series data has missing values or gaps, you might need to handle them appropriately before or during the resampling process. Depending on the nature of the missing data, you could use techniques like linear interpolation, spline interpolation, or methods specifically designed for missing data imputation.

By resampling the irregularly sampled time series data and then applying wavelet decomposition on the resampled data, you can obtain wavelet coefficients that provide a time-frequency representation of the signal.
Reply all
Reply to author
Forward
0 new messages