Skip to content

About

From 64 dimensions to 2 — visualizing the hidden structure of data with PCA, LDA, ICA, MDS, t-SNE, Isomap, LLE, and UMAP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🧩 Exploring Dimensionality Reduction & Manifold Learning

This project explores various Dimensionality Reduction and Manifold Learning algorithms using the classic Digits dataset from scikit-learn.
It demonstrates how high-dimensional data (64 features per image) can be visualized beautifully in 2D and 3D spaces using both linear and non-linear methods.


🚀 Key Concepts Covered

🔹 Linear Methods

  • PCA (Principal Component Analysis) – projects data on directions of maximum variance.
  • LDA (Linear Discriminant Analysis) – supervised reduction maximizing class separability.
  • ICA (Independent Component Analysis) – separates data into statistically independent components.
  • Random Projection – fast, scalable projection preserving approximate distances.

🔹 Non-Linear / Manifold Learning Methods

  • MDS (Multidimensional Scaling) – preserves pairwise distances to maintain geometric structure.
  • Isomap – captures the global manifold structure using geodesic distances.
  • LLE (Locally Linear Embedding) – preserves local neighborhood relationships.
  • t-SNE (t-distributed Stochastic Neighbor Embedding) – great for cluster visualization; focuses on local relationships.
  • UMAP (Uniform Manifold Approximation and Projection) – fast, structure-preserving, and scalable; combines local and global preservation.

📊 Workflow

  1. Data Loading – Digits dataset from scikit-learn.
  2. Preprocessing – Standardization for fair comparison across methods.
  3. Dimensionality Reduction – Apply all listed methods in both 2D and 3D.
  4. Visualization – Compare how each method represents the intrinsic geometry of data.
  5. Feature Engineering & Comparison – Explore how engineered features behave across methods.

🌈 Why UMAP?

UMAP provides a balance between speed, structure preservation, and visual clarity.
It maintains local clusters like t-SNE while also preserving broader relationships, making it perfect for visually meaningful embeddings.


💡 Future Scope

Imagine uploading an image of a handwritten "7" and instantly retrieving similar "7"s from a huge dataset — that’s the real-world power of dimensionality reduction!


🎯 Learning Outcome

While exploring multiple Dimensionality Reduction techniques, I noticed a key insight: t-SNE and UMAP behaved very differently compared to traditional linear methods like PCA or LDA — and here’s why 👇

  • Linear methods (PCA, LDA, ICA, Random Projection) mainly capture global variance — they find directions of maximum spread in data but may miss non-linear patterns.
  • t-SNE (t-distributed Stochastic Neighbor Embedding) focuses on preserving local neighborhoods — it places similar points close together and separates dissimilar ones strongly. ** 🔍 Reason: t-SNE converts distances into probabilities, then minimizes the difference between high-dimensional and low-dimensional similarities, exaggerating cluster separation.
  • UMAP (Uniform Manifold Approximation and Projection) balances local and global structure — it maintains both nearby relationships and broader topology. ** ⚙️ Reason: UMAP builds a graph of local connections and optimizes its low-dimensional embedding to preserve both fine-grained and large-scale structure efficiently.

✨ Result: t-SNE creates very distinct, tight clusters (great for visualization), while UMAP gives smoother, more meaningful global patterns — both revealing hidden structures that linear methods can’t show.

⚙️ Installation & Usage

1️⃣ Clone the repository

git clone https://github.com/<ASHMEET555>/dimensionality-reduction-visualization.git
cd dimensionality-reduction-visualization

About

From 64 dimensions to 2 — visualizing the hidden structure of data with PCA, LDA, ICA, MDS, t-SNE, Isomap, LLE, and UMAP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages