Singular Value Decomposition (SVD) in Python

Matrix decomposition by Singular Value Decomposition (SVD) is one of the widely used methods for dimensionality reduction. For example, Principal Component Analysis often uses SVD under the hood to compute principal components. In this post, we will work through an example of doing SVD in Python. We will use gapminder data in wide form to… Continue reading Singular Value Decomposition (SVD) in Python

Implementing K-means clustering in Python from Scratch

K-means Cluster Assignment: Third Iteration

K-means clustering is one of the commonly used unsupervised techniques in Machine learning. K-means clustering clusters or partitions data in to K distinct clusters. In a typical setting, we provide input data and the number of clusters K, the k-means clustering algorithm would assign each data point to a distinct cluster. In this post, we… Continue reading Implementing K-means clustering in Python from Scratch

PCA example using prcomp in R

PCA plot: PC1 vs PC2 Scatter plot

In this tutorial, we will learn how to perform PCA in R using prcomp() function in R. Principal Component Analysis, aka, PCA is one of the commonly used approaches to do unsupervised learning/ dimensionality reduction. It is a fantastic tool to have in your data science/Machine Learning arsenal. You will be surprised how often the… Continue reading PCA example using prcomp in R