Machine Learning

Intermediate Machine Learning: Principal Component Analysis (PCA)

How to do PCA with Sci Kit Learn

Yujian Tang
Plain Simple Software
9 min readSep 7, 2022

--

Welcome to the third module in our Machine Learning series. So far we’ve covered Linear Regression and Logistic Regression. Just to recap, Linear Regression is the simplest implementation of continuous prediction (i.e. regression) and Logistic Regression is a version of regression that uses a softmax function to do classification. Now let’s get into something a little more complex — Principal Component Analysis (PCA) in Python.

Originally published here: Python PCA

In this post we will cover:

  • What is PCA?
  • Dimensionality Reduction with Principal Component Analysis using SKLearn
  • Python PCA on Randomized Data
  • Creating Our Randomized Sample Dataset for PCA in Python
  • Using Explained Variance to Pick the Number of Components for PCA
  • Image Compression with Python PCA via SKLearn
  • SKLearn PCA Transform in Python for Image Compression

What is PCA?

PCA is a dimensionality reduction technique. The most common applications of PCA are at the start of a…

--

--