Discrete Fourier Transform (fft)

The Discrete Fourier Transform (DFT) converts the observation sequence into a real-valued, same-length sequence of equally-spaced samples of the discrete-time Fourier transform.

The popular Fast Fourier Transform (FFT) implementation is used to efficiently compute the DFT.

For further information, please see the preprocessing tutorial notebook.

Example

1
2
3
4
5
6
7
8
import numpy as np
from sequentia.preprocessing import fft

# Create some sample data
X = [np.random.random((10 * i, 3)) for i in range(1, 4)]

# Transform the data
X = fft(X)

API reference

sequentia.preprocessing.fft(X)[source]

Applies a Discrete Fourier Transform to the input observation sequence(s).

Parameters:
X: numpy.ndarray or List[numpy.ndarray]

An individual observation sequence or a list of multiple observation sequences.

Returns:
transformed: numpy.ndarray or List[numpy.ndarray]

The transformed input observation sequence(s).