Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python with examples


#Frequency #Frequently #guide #fast #fourier #transform #data #scientists #python #examples

A handbook from simple to advanced frequency analysis: exploring a vital tool which is widely underutilized in data science

Daniel Warfield
Towards Data Science

Frequency analysis is extremely useful in a vast number of domains. From audio, to mechanical systems, to natural language processing and unsupervised learning. For many scientists and engineers it’s a vital tool, but for many data scientists and developers it’s hardly understood, if at all. If you don’t know about frequency analysis, don’t fret, you just found your handbook.

picture using differently sized lines to invoke an image of waves
Image by Daniel Warfield using p5.js. All images in this document are either created with p5.js or Python’s Matplotlib library unless otherwise specified.

Who is this useful for? Anyone who works with virtually any signal, sensor, image, or AI/ML model.

How advanced is this post? This post is accessible to beginners and contains examples that will interest even the most advanced users of frequency analysis. You will likely get something out of this article regardless of your skill level.

What will you get from this post? Both a conceptual and mathematical understanding of waves and frequencies, a practical understanding of how to employ those concepts in Python, some common use cases, and some more advanced use cases.

Note: To help you skim through, I’ve labeled subsections as Basic, Intermediate, and Advanced. This is a long article designed to get someone from zero to hero. However, if you already have education or experience in the frequency domain, you can probably skim the intermediate sections or jump right to the advanced topics.

I’ve also set up links so you can click to navigate to and from the table of contents

Click the links to navigate to specific sections

1) The Frequency Domain
1.1) The Basics of the Frequency Domain (Basic)
1.2) The Specifics of the Frequency Domain (Intermediate)
1.3) A Simple Example in Python (Intermediate)
2) Common Uses of the Frequency Domain
2.1) De-trending and Signal Processing (Intermediate)
2.2) Vibration Analysis (Advanced)
3) Advanced Uses of the Frequency Domain
3.1) Data Augmentation (Advanced)
3.2) Embedding and Clustering (Advanced)
3.3) Compression (Intermediate)
4) Conceptual Takeaways for Data Scientists