Cosine curve decomposition

In this section, we are going to actually use the TensorFlow.js API to run the FFT program. TensorFlow.js provides several derived implementations for FFT:

  • tf.spectral.fft
  • tf.spectral.ifft
  • tf.spectral.rfft
  • tf.spectral.irfft

TensorFlow.js also supports short-term Fourier transforms, which are a type of Fourier transformation that takes in a windowed sequence of the original samples:

  • tf.singal.stft

By showing the output of these APIs with samples from cosine or sine waves, we will learn how this algorithm behaves.

Get Hands-On Machine Learning with TensorFlow.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.