Machine Learning

Powerful decomposition mode: the most accurate way to decompose complex signals and time series

Analyzing your time as a data scientist?
Have you ever wondered how signal processing can make your life easier?

If so – stay with me. This article is for you. πŸ™‚

Working with Real-World Time series can be… painful. Financial curves, ECG traces, Neeral signals: They often look like chaotic spikes without structure.

Working with Real-World Time series can be… painful. Financial curves, ECG traces, Neeral signals: They often look like chaotic spikes without structure.

Working with Real-World Time series can be… painful. Financial curves, ECG traces, Neeral signals: They often look like chaotic spikes without structure.

In Data Science, we tend to rely on classic mathematical pre-decompositions: periodic decomposition, block, moving, parallel … These methods are useful, but they come with strong assumptions that rarely work. And when that assumption fails, your machine's learning model may be underperforming or irregular.

Today, we're going to explore a family of methods that have never been taught in scientific training, yet can completely transform how you work with time data.


On today's menu πŸ”

🍰 Why traditional methods struggle with Real-World Time series
˚ How social work tools can help
πŸ” Eviricical decommissioning (EMD) mode also works where it fails


The previous “Classic” techniques I mentioned above are good starting points, but as I said they rely on systematic, defined thinking about how the signal should behave.

Most of them assume that the balance is static, meaning that its statistical properties (ie, diversity, visual content) remain constant over time.

But in reality, most of the real symptoms are:

  • What doesn't stop (Its content usually appears)
  • which is not specific (they cannot be explained by simple addition elements)
  • – and rudeness
  • mixed with multiple simultaneous oscillations

So… What exactly is “money”?

A signal is simply any value that varies over time (often called a Time series in data science).

Some examples:

  • ❀️ Ecg or eeg – Biomedical / Brain Signals
  • πŸŒ‹ Earthquake activity – GEOHophysics
  • πŸ–₯️ CPU usage – System monitoring
  • πŸ’Ή Stock prices, volatility, order flow – Finance
  • 🌦️ Heat or humidity – Meteorology
  • 🎧 Audio waveforms – Speech and sound analysis
Figure 1: Example of Magnetoencephalography (Meg). (Photo by Author)

Signals are everywhere. And almost all of them violate the assumptions of the time models of the past.

They are rarely “clean.” What I mean is that a single signal is often a mixture of several processes happening at the same time.

Within a single signal, you usually get:

  • Slow styles
  • periodic oscillations
  • short bursts
  • Random noise
  • hidden rhythms you can not see directly

Now imagine if you could separate all these things – directly from the data – Without taking objects, without specifying frequency bands, and without forcing the signal to a predefined base.

That is the promise of Data-driven signal degradation.

This article is part 1 of a 3-part series on dynamic awakening:

  1. EMD – Dynamic mode (today)
  2. VMD – Diversity mode (Next)
  3. MVMD – MULTIVARIOTE VMD (Next)

Each method is more powerful and focused than the last – and by the end of the series, you will understand how the processing methods produce clean, transformable components.

Powerful decay mode

A robust mode of deception was introduced by Huang et al. (1998) As part of the Hilbert-Huang Transform.
Its mission is simple but powerful: Take the residual and separate it into a set of pure Oscillatory objects, called Imfs Mode Functions (IMFS).

Each IMF corresponds to an oscillation present in your signal, from the fastest to the slowest styles.

See picture 2 below:
Above, you see the first signal.
Below it, you see several IMFs – each capturing a different “layer” of the hidden oscillation within the data.

Im₁ It contains a quick variation
Imfβ‚‚ It captures a slow rhythm

IMF + the final IMF + represents a minor or fundamental trace

Some IMFs will be useful in your machine learning work; Others may equate to noise, art, or passive oscillations.

Figure 2: The original signal (top) and 5 IMFS (bottom), ordered from the high frequency of the low components. (Photo by Author)

What is the Math behind EMD?

Any signal x

Where:

  • Ci
  • Im₁ boil The oscillations are very fast
  • Imfβ‚‚ abscess a Slower Oscillationand so on…
  • r
  • Adding all the IMFs + Redard Redals is the exact first balance.

The IMF is not Clean the oscillation derived directly from the data.
It must satisfy two simple properties:

  1. Zero crossing value β‰ˆ Extrema value
    β†’ Oscillation is well behaved.
  2. The mean of the upper and lower envelopes is almost zero
    β†’ Oscillation is locally symmetric, without long-term information.

These two rules make the IMFS basically data driven and just convert Unlike 4ier or wavelets, they force the signal into predetermined shapes.

Intuition behind the EMD algorithm

The EMD algorithm is surprisingly accurate. Here is the extraction loop:

  1. Start with your signal
  2. Find all local maxima and minima
  3. They connect to form the upper and lower envelope
    (See figure 3)
  4. Point out that both envelopes
  5. Extract what this means from the signal

β†’ This gives you an “IMF owner.”

6. Then examine the two IMF scenarios:

  • Does it have the same number of zero crossings and extrema?
  • Does it mean its envelope is almost zero?

When yes β†’ take out Im₁.
When – to be β†’ You repeat the process (called gxit) until it meets the criteria.

7. Once you get the IMF₁ (fast oscillation):

  • He takes it out on the first signal,
  • The rest is what it is A new signal,
  • And you repeat the process of extracting IMFβ‚‚, IMF₃, …

This continues until no meaningful oscillation is left.
How about the rest the relative norm r

Figure 3: One iteration of EMD. Top: Original signal (blue). Middle: upper and lower envelopes (red). Bottom: means Local (Black). (Photo by Author)

Emd in practice

To better understand how EMD works, let's build our own artificial intelligence.

We will mix three parts:

  • Low frequency oscillation (about 5 hz)
  • Very high oscillation (about 30 hz)
  • Little random white noise

When everything boils down to a single puzzle, we will introduce the EMD method.

import numpy as np
import matplotlib.pyplot as plt

# --- Parameters ---
Fs = 500         # Sampling frequency (Hz)
t_end = 2        # Duration in seconds
N = Fs * t_end   # Total number of samples
t = np.linspace(0, t_end, N, endpoint=False)

# --- Components ---
# 1. Low-frequency component (Alpha-band equivalent)
f1 = 5
s1 = 2 * np.sin(2 * np.pi * f1 * t)

# 2. High-frequency component (Gamma-band equivalent)
f2 = 30
s2 = 1.5 * np.sin(2 * np.pi * f2 * t)

# 3. White noise
noise = 0.5 * np.random.randn(N)

# --- Composite Signal ---
signal = s1 + s2 + noise

# Plot the synthetic signal
plt.figure(figsize=(12, 4))
plt.plot(t, signal)
plt.title(f'Synthetic Signal (Components at {f1} Hz and {f2} Hz)')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.grid(True)
plt.tight_layout()
plt.show()
Figure 4: An artificial signal that contains multiple frequencies. (Photo by Author)

Important details:

EMD automatically selects the IMFS value.
It keeps the decay of the signal until to stop the trend is achieved – usually when:

  • No more oscillatory structure can be extracted
  • or what remains becomes a monotonic path
  • or the process of cleaning sticks

(You can also set a maximum number of IMFs if needed, but the algorithm naturally stops by itself.)

from PyEMD import EMD


# Initialize EMD
emd = EMD()
IMFs = emd.emd(signal, max_imf=10) 

# Plot Original Signal and IMFs

fig, axes = plt.subplots(IMFs.shape[0] + 1, 1, figsize=(10, 2 * IMFs.shape[0]))
fig.suptitle('EMD Decomposition Results', fontsize=14)

axes[0].plot(t, signal)
axes[0].set_title('Original Signal')
axes[0].set_xlim(t[0], t[-1])
axes[0].grid(True)

for n, imf in enumerate(IMFs):
    axes[n + 1].plot(t, imf, 'g')
    axes[n + 1].set_title(f"IMF {n+1}")
    axes[n + 1].set_xlim(t[0], t[-1])
    axes[n + 1].grid(True)

plt.tight_layout(rect=[0, 0.03, 1, 0.95])
plt.show()
Figure 5: EMD decomposition of synthetic signal. (Photo by Author)

Limitation of EMD

EMD is powerful, but has several weaknesses:

  • Mixing Mode: Different frequencies can end up with the same IMF.
  • Overflitting: EMD determines the amount of imfs itself and can issue much more.
  • Sound sensitivity: Small changes in sound can completely transform IMFS.
  • No Strong Mathematical Foundation: Results are not guaranteed to be strong or unique.

Due to this limitation, many improved types exist (EEMD, Ceemdan), but they remain powerful.

This is exactly what they are like Vmd were created – and this is what we will explore in the next article of this series.

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button