Skip to main content

Turning noisy signals into clear insights — that’s the magic of Independent Component Analysis (ICA)! 🎯

 Ever wondered how apps separate overlapping voices in a recording or extract hidden signals from noisy data? That’s where Independent Component Analysis (ICA) comes in.


ICA is a statistical technique for decomposing mixed signals into their independent sources. Unlike PCA, which only decorrelates data, ICA assumes independence among sources, making it ideal for real-world signals like:

🎧 Audio recordings (separating speakers)
🧠 EEG/MEG brain signals (isolating neural patterns)
📈 Financial data (finding hidden market factors)




How it works (visualized below):
1️⃣ Start with mixed signals (x₁, x₂, x₃).
2️⃣ Apply ICA — the algorithm identifies independent components.
3️⃣ Result: Separated independent signals (s₁, s₂, s₃).

A Sample Code (in Python) : 

# Import necessary libraries
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import FastICA

# Step 1: Generate sample signals
np.random.seed(42)
n_samples = 2000
time = np.linspace(0, 8, n_samples)

# Original independent signals
s1 = np.sin(2 * time)          # Sinusoidal signal
s2 = np.sign(np.sin(3 * time)) # Square signal
s3 = np.random.rand(n_samples)  # Random noise signal

S = np.c_[s1, s2, s3]

# Step 2: Mix the signals
A = np.array([[1, 1, 0.5], [0.5, 2, 1], [1.5, 1, 2]])  # Mixing matrix
X = S.dot(A.T)  # Mixed signals

# Step 3: Apply ICA
ica = FastICA(n_components=3)
S_ = ica.fit_transform(X)  # Recovered signals
A_ = ica.mixing_           # Estimated mixing matrix

# Step 4: Plot results
plt.figure(figsize=(10, 6))

plt.subplot(3, 1, 1)
plt.title("Mixed Signals")
plt.plot(X)
plt.subplot(3, 1, 2)
plt.title("Original Signals")
plt.plot(S)
plt.subplot(3, 1, 3)
plt.title("Recovered Signals using ICA")
plt.plot(S_)

plt.tight_layout()
plt.show()


When executed, the above code returns the recovered signals as 





💡 ICA lets us see the hidden structure in data that otherwise looks noisy.

Popular posts from this blog

Mathematics for Artificial Intelligence : Multivariate Analysis

 A simplified guide on how to prep up on Mathematics for Artificial Intelligence, Machine Learning and Data Science: Multivariate Analysis (Important Pointers only)   Module VIII : Multivariate Analysis  Multivariate analysis is a branch of statistics that deals with the observation and analysis of more than one statistical outcome variable at a time. It is used to understand the relationships between multiple variables simultaneously and to model their interactions. I. Principal Component Analysis (PCA). Principal Component Analysis (PCA) is a statistical technique used to simplify a dataset by reducing its dimensions while retaining most of the variance in the data. Important Concepts: Dimensionality Reduction : PCA reduces the number of dimensions (features) in the dataset while preserving as much variability (information) as possible. Principal Components : These are new, uncorrelated variables formed from linear combinations of the original variables. The first prin...

Mathematics for Artificial Intelligence : Numerical Methods

 A simplified guide on how to prep up on Mathematics for Artificial Intelligence, Machine Learning and Data Science: Numerical Methods (Important Pointers only) Module VII : Numerical Methods  I. Bisection Method. A numerical technique for solving equations of the form f ( x ) = 0 . It is a type of root-finding method that repeatedly narrows down an interval where a root of the function exists. Steps: Choose the initial interval [ a , b ] [a, b] : Select two points a a and b b such that f ( a ) f(a) and f ( b ) f(b) have opposite signs. This indicates that there is at least one root in the interval [ a , b ] [a, b] . Compute the midpoint c c : Calculate the midpoint of the interval: c = a + b 2 c = \frac{a + b}{2} ​ Evaluate the function at the midpoint : Compute f ( c ) f(c) . Determine the subinterval : If f ( a ) ⋅ f ( c ) < 0 , the root lies in the interval [ a , c ] [a, c] . Set b = c . If f ( b ) ⋅ f ( c ) < 0 f(b) \cdot f(c) < 0 , the root lies in the in...

Mathematics for Artificial Intelligence: Boolean Algebra

 A simplified guide on how to prep up on Mathematics for Artificial Intelligence, Machine Learning and Data Science: Boolean Algebra (Important Pointers only)   Module VI : Boolean Algebra  I. Information Theory. Information theory, a mathematical framework developed by Claude Shannon in the mid-20th century, quantifies information and provides tools for analyzing communication systems and processes. It is at the intersection of electronic engineering, mathematics, statistics, computer science, neurobiology, physics, and electrical engineering.  Information : Information measures the reduction of uncertainty. When an event is uncertain, the receipt of a message about the event reduces this uncertainty. Information is quantified in terms of bits (binary digits). Abstractly, information can be thought of as the resolution of uncertainty. Shannon's main result, the noisy-channel coding theorem, showed that, in the limit of many channel uses, the rate of informatio...