Understanding PCA (Principal Component Analysis): The “Data Compression Without Losing Important…
Machine Learning models work with data.
Understanding PCA (Principal Component Analysis): The “Data Compression Without Losing Important Information” Technique
Machine Learning models work with data.
Sometimes: the data is simple, small, and easy to understand.
But in real-world problems, data often contains: hundreds of features, unnecessary information, noise, and complexity. And that creates a huge problem.
Because more data dimensions do NOT always mean better learning.
That’s where PCA (Principal Component Analysis) comes in.
PCA helps machines: Reduce complexity while keeping the most important information.
Imagine This Real-Life Scenario
Suppose you want to summarize an entire movie for your friend.
The movie is:
- 3 hours long,
- contains hundreds of scenes,
- many side conversations,
- and unnecessary details.
But instead of explaining EVERYTHING, you only share:
- the most important scenes,
- major plot twists,
- and key moments.
Your friend still understands the story. That is exactly what PCA does.
It keeps the MOST important information while removing less important details.
What is PCA?
PCA stands for: Principal Component Analysis
It is a dimensionality reduction technique used in:
- Machine Learning,
- Data Science,
- Computer Vision,
- and data analysis.
Its main goal is: To reduce the number of features while preserving maximum important information.
What is Dimensionality?
In Machine Learning, features are often called: Dimensions
Example:
Suppose a student dataset contains:
- marks,
- attendance,
- age,
- study hours,
- sleep hours.
Then: The dataset has 5 dimensions.
More features = higher dimensionality.
Why High Dimensional Data Becomes a Problem
More dimensions can create:
- slower training
- more memory usage
- unnecessary complexity
- noise
- overfitting
- difficult visualization
This is related to a famous problem called: Curse of Dimensionality
Main Idea Behind PCA
PCA asks: “Which directions contain the MOST useful information?”
Then it:
- keeps important directions,
- removes less useful ones,
- and compresses data.
The Most Important Concept: Variance
Variance is the heart of PCA.
Variance means:How much the data spreads.
Higher variance means: more information, more useful patterns.
Lower variance often means: less important information, repetitive data, or noise.
PCA tries to: Keep directions with maximum variance.
Real-Life Analogy for Variance
Imagine observing students’ performance.
Suppose:
- everyone has almost identical shoe sizes, but
- marks vary significantly.
Which feature tells us more useful information?
Obviously: marks. Because they vary more.
That’s the intuition behind variance.
What are Principal Components?
Principal Components are: New transformed axes that capture maximum variance.
These are NOT original features.
Instead, PCA creates:
- smarter,
- compressed,
- information-rich features.
Real-Life Analogy for Principal Components
Suppose you’re taking a photograph of a crowded city.
You don’t need every tiny detail. You simply position the camera angle where:
- the MOST information is visible.
That “best viewing direction” is similar to a principal component.
How PCA Works
PCA works in multiple steps.
Step 1: Standardize the Data
Feature scaling is important. Because features with larger values can dominate calculations. So we normalize or standardize data first.
Step 2: Find Variance Relationships
PCA studies: How features vary together.
This relationship is represented using: Covariance Matrix
Step 3: Find Principal Components
The algorithm identifies directions with: Maximum variance.
These directions become principal components.
Step 4: Reduce Dimensions
Finally, PCA keeps only the most important components. Less important dimensions are removed.
Understanding Principal Components
First Principal Component (PC1)
Captures: Maximum variance. Most important information.
Second Principal Component (PC2)
Captures: Second highest variance.
And so on.
One Important Thing
Principal Components are: Orthogonal to each other.
Meaning: they are independent, and do not overlap in information.
Why PCA is So Useful
Because it helps:
- reduce complexity
- speed up training
- reduce noise
- improve visualization
- prevent overfitting
Example: Image Compression
Suppose an image contains:
- millions of pixels,
- unnecessary details,
- repeated patterns.
PCA can reduce dimensions while preserving:
- important shapes,
- patterns,
- and visual structure.
This reduces storage and computation.
Real-Life Applications of PCA
1. Data Visualization
Humans cannot visualize: 50 dimensions, 100 dimensions, or 1000 dimensions.
PCA reduces data into:
- 2D,
- or 3D
for visualization.
2. Face Recognition
PCA helps identify important facial features while reducing image complexity.
3. Image Compression
Used to reduce image size while maintaining quality.
4. Noise Reduction
PCA removes low-variance noisy features.
5. Medical Data Analysis
Medical datasets often contain hundreds of features. PCA helps reduce unnecessary complexity.
6. Finance and Stock Analysis
Used for analyzing:
- market trends,
- stock behavior,
- and hidden relationships.
Advantages of PCA
- Reduces dimensionality
- Speeds up machine learning models
- Removes noise
- Improves visualization
- Helps prevent overfitting
- Compresses data efficiently
Disadvantages of PCA
- Information loss can happen
- Principal components are harder to interpret
- Sensitive to feature scaling
- Sometimes removes useful details
PCA vs Feature Selection
This is VERY important.
Feature Selection
Simply removes less important existing features.
Example: keeping only Age and Salary.
PCA
Creates: NEW transformed features.
These are combinations of original features.
One Important Limitation: Interpretability
After PCA, new principal components may become mathematically difficult to interpret.
Because: They are combinations of multiple original features.
So PCA improves efficiency, but sometimes reduces interpretability.
Another Important Concept: Explained Variance
PCA helps measure: How much information each component preserves.
Example:
- PC1 → 70% variance
- PC2 → 20% variance
Together: 90% information preserved.
This helps decide how many components to keep.
A Simple Intuition to Remember Forever
If K-Means thinks like: “Which group do you belong to?”
And PAM thinks like: “Who is the best representative?”
Then PCA thinks like: “What is the MOST important information here?”
That one sentence explains almost the entire concept.

메타데이터
- post_id
- a00d783d79d7
- slug
- understanding-pca-principal-component-analysis-the-data-compression-without-losing-important-a00d783d79d7
- url
- https://medium.com/@kachrooshireen3/understanding-pca-principal-component-analysis-the-data-compression-without-losing-important-a00d783d79d7
- canonical_url
- https://medium.com/@kachrooshireen3/understanding-pca-principal-component-analysis-the-data-compression-without-losing-important-a00d783d79d7
- author_url
- https://medium.com/@kachrooshireen3
- status
- ok
- fetched_at
- 2026-06-10 08:17:25