Use Frequency More Frequently, A Guide To Using The Fast Fourier Transform For Data Scientists in Python With Examples - Towards Data Science
Use Frequency More Frequently, A Guide To Using The Fast Fourier Transform For Data Scientists in Python With Examples - Towards Data Science
Open in app
10
Search
Member-only story
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
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 1/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
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
Table Of Contents
Click the links to navigate to specific sections
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 2/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
First, what is a domain? Imagine you want to understand temperature changes over
time. Just reading that sentence, you probably imagined a graph like this:
What you might be imagining when you think of temperature over some period of time
Maybe you imagine time progressing from left to right, and greater temperatures
corresponding to higher vertical points. Congratulations, you’ve taken data and
mapped it to a 2d time domain. In other words, you’ve taken temperature readings,
recorded at certain times, and mapped that information to a space where time is
one axis, and the value is another.
There are other ways to represent our temperature vs time data. As you can see,
there’s a “periodic” nature to this data, meaning it oscillates back and forth. A lot of
data behaves this way: sound, ECG data from heartbeats, movement sensors like
accelerometers, and even images. In one way or another, a lot of things have data
that goes to and fro periodically.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 3/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
All the waves, of various frequencies and amplitudes, which goes into making our original wave. You might
notice that there’s one wave which is more subtle than the other two and is practically impossible to see in
the original. Finding this hidden information is one benefit of frequency analysis.
These waves are extracted using a Fourier Transform, which maps our original wave
from the time domain to the frequency domain. Instead of value vs time, the
frequency domain is amplitude vs frequency.
Each of the extracted waves has a frequency and amplitude. If we plot frequency on the x axis, and amplitude
on the y axis, we have plotted what is called a spectrogram
So, to summarize, the Fourier Transform maps data (usually, but not always in the
time domain) into the frequency domain. The frequency domain describes all of the
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 4/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
waves, with different frequencies and amplitudes, which when added together
reconstruct the original wave.
The original wave, in the time domain, and the frequency content in the frequency domain. These both
describe the same signal
The sin function is the ratio of the opposite side of a triangle vs the hypotenuse of
that right triangle, for some angle.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 5/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
θ(theta) is an angle of a right triangle, a is the length of the opposite side of θ, and c is the length of the
hypotenuse
The sin wave is what you get when you plot a/c for different values of θ (Different
Angles), and is used in virtually all scientific disciplines as the most fundamental
wave.
The relationship between the sin function, right triangles, and the sin wave
ω(omega) represents frequency (larger values of ω mean the sin wave oscillates
more quickly)
ϕ(phi) represents phase (changing ϕ shifts the wave to the right or left)
A scales the function, which defines the amplitude (how large the oscillations are).
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 6/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
“A” controls the amplitude (height), “omega” controls the frequency (speed of oscillation), and “phi” controls
the phase (shift from side to side)
A Traditional Amplitude vs frequency spectrogram (left) vs a more descriptive amplitude, frequency, and
phase plot.
When converting a signal to the frequency domain (using a library like scipy, for
instance) you’ll get a list of imaginary numbers.
If you’re not familiar with imaginary numbers, don’t worry about it. You can imagine
these lists as points, where the index of the list corresponds to frequency, and the
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 7/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
I haven’t talked about the units of these numbers. Because units are, essentially,
linear transformations to all data, they can often be disregarded from a data science
perspective. However, if you do use the frequency domain in the future, you will
likely encounter words like Hertz (Hz), Period (T), and other frequency domain-
specific concepts. You will see these units explored in the examples.
If you want to learn more about units in general, and how to deal with them as a
data scientist, I have an article all about it here
First, we’ll load and plot the sound data, which is an amplitude over time. This data
is used to control the location of the diaphragm within a speaker, the oscillation of
which generates sound.
"""
Loading a sample waveform, and plotting it in the time domain
"""
#importing dependencies
import matplotlib.pyplot as plt #for plotting
from scipy.io import wavfile #for reading audio file
import numpy as np #for general numerical processing
#plotting channel 0
plt.subplot(2, 1, 1)
plt.plot(x,data[:N,0])
#plotting channel 1
plt.subplot(2, 1, 2)
plt.plot(x,data[:N,1])
#rendering
plt.show()
The left and right sound waves from a snippet of stereo trumpet music, in the time domain. The X axis
corresponds to time, in seconds, and the y axis corresponds to the amplitude of the signal, which controls
the location of a speaker diaphragm, generating sound. (Raw trumpet data from storyblocks.com)
"""
Converting the sample waveform to the frequency domain, and plotting it
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 9/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
#importing dependencies
from scipy.fft import fft, fftfreq #for computing frequency information
plt.show()
The frequency domain representation of the previously loaded trumpet audio. The X axis is the frequency (in
Hz, which is oscillations/second), and the y axis is the amplitude of the signal.
1. Both signals contain very similar frequency content, which makes sense
because they’re both from the same recording. Often stereo recordings are
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 10/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
4. This is a very clear sound, the spikes are not muddled by a lot of unrelated
frequency content
5. This is an organic sound. There is some frequency content which is not related
to the base frequency. This can be thought of as the timbre of the instrument
and makes it sound like a trumpet, rather than some other instrument
performing the same note.
In section 2 we’ll explore how the frequency domain is used commonly in time
series signal processing. In section 3 we’ll explore more advanced topics.
Let’s say you have an electrical system, and you want to understand the minute-by-
minute voltage changes in that system over the course of a day. You set up a voltage
meter, capture, and plot the voltage information over time.
Let's say, for the purposes of this example, we only cared about the graph for the
minute-by-minute data, and we consider waves which are too high of a frequency to
be noise, and waves which are too low in frequency to be a trend that we want to
ignore.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 11/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
We don’t care about the long term trends which take place over the course of hours. We’re interested in
minute-by-minute data (raw data synthetically generated by the author)
We don’t care about waves which oscillate too quickly, these are considered as noise in the signal
So, for this example, we only care about observing content which oscillates slower
than once per second, and faster than once every 5 minutes. We can convert our
data to the frequency domain, remove all but the frequencies we’re interested in
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 12/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
observing, then convert back to the time domain. so we can visualize the wave
including only the trends we’re interested in.
"""
Plotting the entire frequency domain spectrogram for the mock electrical data
"""
#load electrical data, which is a numpy list of values taken at 1000Hz sampling
x, y = load_electrical_data()
samplerate = 1000
N = len(y)
#rendering
plt.show()
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 13/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
This is the complete , unfiltered spectrogram for the electrical system we are analyzing
We can set all the frequency content we are not interested into zero. Often you use a
special filter, like a butter-worth filter, to do this, but we’ll keep it simple.
"""
converting the data to the frequency domain, and filtering out
unwanted frequencies
"""
#applying naiive filter, which will likely create some artifacts, but will
#filter out the data we don't want
yf[np.abs(xf) < lowfq] = 0
yf[np.abs(xf) > highfq] = 0
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 14/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
plt.gca().set_yscale('log')
#rendering
plt.show()
The plot of the frequency domain we’re isolating, with all other frequency information set to zero
Now we can perform an inverse Fast Fourier Transform to reconstruct the wave,
including only the data we care about
"""
Reconstructing the wave with the filtered frequency information
"""
#importing dependencies
from scipy.fft import ifft #for computing the inverse fourier transform
#plotting
plt.plot(x,y_filt)
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 15/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
#rendering
plt.show()
A few minutes of data, with our filter enabled. We have removed excessively high frequency content, and
brought the wave to center around 0 by removing excessively low frequency content.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 16/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
Vibration data taken over a period of time where the engine experienced a minor failure. In the time domain
it’s virtually impossible to see the time of failure. (raw data synthetically generated by the author)
To analyze this data, we will compute and render what is called a mel spectrogram.
A mel spectrogram is just like a normal spectrogram, but instead of computing the
frequency content across the entire waveform, we extract the frequency content
from small rolling windows extracted from the signal. This allows us to plot how the
frequency content changes over time.
"""
plotting a mel-spectrogram of motor vibration to diagnose the point of failure
note: if you don't want to use librosa, you can construct a mel-spectrogram
easily using scipy's fft function across a rolling window, allowing for more
granular calculation, and matplotlib's imshow function for more granular
rendering
"""
#importing dependencies
import librosa #for calculating the mel-spectrogram
import librosa.display #for plotting the mel spectrogram
#rendering
plt.show()
A mel spectrogram of the motor data. Instead of the a 2d frequency spectrogram, mel spectrograms are 3d:
The vertical axis is the frequency of oscillation, the x axis is time (in this case a percentage of time) that the
frequency content was calculated, and the color represents amplitude, which is measured in a unit called
decibels. Note that at time 0.2, the frequency content of the motor suddenly changes.
In a Mel Spectrogram, each vertical slice represents a region of time, with high-
frequency content being shown higher up, and low-frequency content being shown
lower down in the plot. It’s easy to see that at time 0.2 (20% through our data), the
frequency content changed dramatically. At this point a balancing weight became
loose, causing the engine to become unbalanced. Maintenance at this point may
save the engine from excess wear in the future.
A simple yet effective way to employ this principle is with scheduled vibration
readings. A worker sticks an accelerometer on the body of a motor with a magnet
and records the frequency content once or twice a month. Those windows of
vibration data are then converted to the frequency domain, where certain key
features are extracted. A common extracted feature from the frequency domain is
power spectral density, which is essentially the area under the frequency domain
curve over certain regions of frequencies. Extracted features can be plotted over
several weeks of recordings and used as a proxy for overall motor health.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 18/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
Data augmentation is the process of creating fake data from real data. The
quintessential example is image classification to bolster a data set for classifying if
images are of a dog or a cat.
Example of image augmentation, where a single image can be used to generate multiple images for a
machine learning model to learn from. Created with Affinity Designer 2, stock photo from storyblocks.com
Augmentation can be an incredibly powerful tool, but what if you don’t have
images? What if you have sound, motion, temperature, or some other signal? How
can one sensibly augment these types of data? In the time domain, augmentation
strategies look a lot more like regularization strategies: add a bit of noise here, and
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 19/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
shift the data up or down there. They add random information to data, which can be
useful, but they don’t really make new examples.
We can steal something from the music production scene: a wavetable. The idea
behind a wavetable is to convert two waves to the frequency domain, interpolate
between the two in the frequency domain, then convert the interpolation back to
the time domain. I don’t mean blending, where you overlay one signal over the
other, but making a completely new wave which contains frequency content from
two (or more) other waves.
Let’s imagine we’re trying to build a model to detect if people are talking or not in an
audio snippet. We have a bunch of samples of audio where people are talking, and a
bunch of samples where people aren’t, both in a variety of situations. This data
requires someone to go out with a collection of different microphones and capture
sounds, and then manually flag if the data contains someone talking or not, in a
variety of situations. let’s say the model has to be very robust, and very accurate, and
recording sufficient data to reach desired performance levels is not financially
feasible.
In theory, the thing that makes human speech sound the way it does is frequency
content. A blend of frequency content from one snippet of talking and another
snippet of talking should still sound like someone talking. We can use a wave table
to construct these artificial waves, thus making more data for free (besides a data
scientist's salary and big old expensive computing resources on the cloud).
"""
loading and plotting two waveforms recorded in two seperate environments,
both including people talking
"""
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 20/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
offset = 1000000
#plotting waveform 1
plt.subplot(2, 1, 1)
plt.plot(x1,y1[offset:offset+N])
plt.xlabel('t (seconds)')
plt.ylabel('A (db)')
#plotting waveform 2
plt.subplot(2, 1, 2)
plt.plot(x2, y2[offset:offset+N])
plt.xlabel('t (seconds)')
plt.ylabel('A (db)')
#rendering
plt.show()
Two waveforms, both prominently including people talking. (raw data from storyblocks.com)
We can convert both of these waves to the frequency domain, and create several
frequency representations which are interpolations between the two waves.
"""
Converting both waves to the frequency domain, constructing a wave table, and r
"""
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 21/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
fq_interp = []
#creating interpolations
for per in np.linspace(0.1,0.9,9):
thisfq = (fq1*per) + (fq2*(1-per))
fq_interp.append((per, thisfq))
#plotting interpolation
plt.plot(xf[:N//2], np.array([per]*(N//2)), 2.0/N * np.abs(thisfq[0:N//2]))
plt.show()
Frequency spectrograms for both the original waveforms (at the extremes) and the waveforms in the middle.
Note that the the plot shows the spectrogram as frequency vs amplitude, but the interpolation also is done
over the phase as well.
We can now compute the inverse Fast Fourier Transform on all of these interpolated
frequency domains, and extract our table of waves.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 22/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
"""
Computing the inverse fft on the frequency content, and constructing the final
"""
#creating interpolations
for per, interp in fq_interp:
waveform = ifft(interp)
plt.show()
The final wave table. The extreme waves are the source waves, while the ones in between are interpolations
in the frequency domain.
And there we go. From 2 waves of people talking, we now have 10 waves of people
talking. Data augmentation can be a tricky task, as you can easily create data which
is not actually indicative of the data you’re trying to emulate. When employing a
similar augmentation strategy, you can use augmentations which are closer to the
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 23/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
source waves (80% one wave, 20% another). These will be more likely to be realistic
than waves closer to the center (50%, 50%).
For this example, we’ll use the output from a sentiment analysis model to cluster
different products based on their customer sentiment over time. Let’s say we run a
store with reviews, and those reviews fluctuate between positive and negative. We
notice we have some reviews which correlate with one another. We want to find
products which have similar sentiment analysis trends, such that they can be
grouped together and further understood.
"""
loading 1000 average sentiment scores over the course of a year,
and plotting the first 10 of them
"""
#rendering
plt.xlabel('days')
plt.ylabel('sentiment (low to high)')
plt.show()
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 24/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
As you can see, we have many examples of user sentiment, averaged on a per-day
basis. We can remove the very low-frequency content, which will remove very long-
term average trends (like the average), and we will remove very high-frequency
content, which is noise and is unlikely to create useful clusters.
"""
Converting to the frequency domain, removing very low and high frequency conten
We do this, so we can visually understand the frequency content which we deem i
"""
#importing dependencies
from scipy.fft import fft, ifft #for computing frequency information
#getting signal
sig = sentiments[i]
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 25/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
#rendering
plt.show()
Ultimately, we will be clustering data in the frequency domain. We generate this plot just so we can confirm
that we’re preserving the type of content we care about: not too low frequency, and not too high frequency.
Now we’re done with the time domain, and will begin working on building up our
clustering in the frequency domain. Let’s look at our filtered frequency domain
plots
The input to our clustering operation will be a list of amplitudes, each of which
corresponds to a specific frequency. We could feed this data to our clustering
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 26/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
a representation of four sin waves, plotted in the frequency domain, for demonstrative purposes
You would expect the waves on the left to cluster together, and the waves on the
right to cluster closely together. However, the vectors which describe this data look
like this:
[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0]
[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]
From the perspective of t-SNE, all of these waves are, equally, orthogonal to each-
other, as none of them share any value along a similar axis. We can get around this
issue by making the frequency domain “fuzzy”; we can apply a moving average to
this data such that frequency content blends to adjacent regions.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 27/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
our sample data, with an exponential moving average applied in both directions, causing similar frequency
content to bleed into one another.
This data is significantly more likely to yield good clustering results, as similar
frequency content spikes are more apt to bleed into one another. Let’s apply this
concept to our sample plot of sentiment data:
"""
Converting data to the frequency domain, and applying an exponential
moving average in both directions. This is the data we will be clustering.
"""
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 28/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
Filtered amplitude over frequency data, for clustering. Keep in mind, there are numerous changes that can
be made to this general approach. Different high and low frequencies can be used, different spans of the
exponential average can be used, the frequency domain can be normalized such that relative amplitudes are
similar, etc.
As a result of our processing steps, this data is significantly more likely to create
clusters of data we actually care about. Now we can tie all this together, and create
our final cluster:
"""
Converting all the sentiment waveforms to the frequency domain,
applying filtration, and embedding in 2d with TSNE
"""
#importing dependencies
from sklearn.manifold import TSNE
#converting data to frequencies, and filtering out content, for al product sent
wfs = [np.abs(fft(y)[0:N//2][1:20]) for y in sentiments]
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 29/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
#plotting
plt.scatter(embedding[:,0],embedding[:,1])
t-SNE plot of the filtered frequency domain for all user sentiment product reviews.
And that’s it! Naturally, for a practical application, a lot of work has to be done after
this graph is generated. Likely, these clouds of data would have to be explored, and
potentially labeled, and further refinement of key parameters would have to be
done to gain further insights. For this example, though, we have used the frequency
domain to apply a clustering algorithm to time series data, allowing us to see which
sentiments oscillate in similar ways. This type of analysis could inform product
recommendations within a website, for instance.
Signals contain a lot of data. Sampling at 96,000 samples per second for a few hours
yields massive audio files. These raw recordings are useful for high-quality audio
processing, but when you’re done and want to send a sample to a friend, you’re
willing to sacrifice a bit of audio quality for speed and size. You can down-sample to
a point (send fewer samples per second), however, that will limit the maximum
pitch of the frequencies you can send (If you’re only sending 200 samples/second
you can’t send any frequency higher than 100 Hz). Instead, you can convert your
sample to the frequency domain, compress similar frequencies together, then send
the frequency domain along with the sampling rate. the recipient can then rebuild
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 30/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
the compressed audio via a transform from the frequency domain to the time
domain. This allows you to send arbitrarily high frequencies without needing to
send an arbitrarily large amount of data. The reason mp3 files, for instance, are so
much smaller than .wav files is that they use a Fourier transform prominently in
their encoding.
Using frequency analysis directly as a tool can be vital for solving certain problems,
as we’ve seen in previous examples. What often goes unappreciated is the usage of
the frequency domain as a concept. As a data scientist, it might be difficult to wrap
your brain around self-similar modeling strategies like recurrent and convolutional
networks, especially when solving specific, subtle problems. Sometimes, thinking of
these problems as a quasi-frequency domain extraction can be more useful.
5) Summary
(Back To Table of Contents)
In this article we covered the frequency domain, how it relates to signals and sin
waves, and saw a few examples of frequency domain representations. We saw how a
time-series signal can be converted to the frequency domain, and vice versa, and
saw several examples of how, by converting to the frequency domain, several
classes of problems can be solved.
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 31/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
Attribution: All of the images in this document were created by Daniel Warfield. You
can use any images in this post for your own non-commercial purposes, so long as
you reference this article, https://danielwarfield.dev, or both.
Deep Dives
Follow
Data Scientist and Educator, teaching machine learning Intuitively and Exhaustively.
https://iaee.substack.com/
508 6
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 33/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
4.2K 49
1.91K 19
YOLO — By Hand
A breakdown of the math within YOLO
142 1
1.91K 19
2.6K 17
Lists
801 18
2.6K 6
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 38/40
10/06/2024, 13:03 Use Frequency More Frequently, a guide to using the fast fourier transform for data scientists in python wit…
361 5
# No cheating pls!!
4.91K 24
https://towardsdatascience.com/use-frequency-more-frequently-14715714de38 40/40