Machine Learning Animations

Understanding machine learning through beautiful algorithm animations

Here we present beautiful animated visualizations for some popular Machine Learning algorithms, built with the R package animation. These animations help to understand algorithm iterations and hyper-parameter tuning.

The source code is available on GitHub.

Gradient Boosting Machine Iterations

Classification Decision Boundary of the Gradient Boosting Machine (GBM) from the R package xgboost as boosting iterations proceed.

+ Source Code


K-Nearest Neighbors Classifier

Analysing how the the number of nearest neighbors \(k\) affects the classification Decision Boundary of the KNN algorithm from the R package fastknn. We consider 2 probability estimators for the class membership probabilities: a voting rule and a weighted voting rule (shrinkage estimator).

+ Source Code


Expectation-Maximization Algorithm

Gaussian Mixture Model (GMM) fitted by Expectation-Maximization (EM) algorithm with random initialization.

Source Code is not available yet.


Gaussian Mixture Density

Density estimation using a GMM with 7 components. Model fitting is performed by Expectation-Maximization algorithm with randomly assigned initial parameters. Positive definiteness of covariance matrix is achieved replacing the unrestricted maximum likelihood estimator by Ledoit-Wolf shrinkage estimator.

Source Code is not available yet.


Regularized Extreme Learning Machine

Classification Decision Boundary of a Single Layer Feedforward Network (with 150 randomly assigned hidden neurons) trained by Extreme Learning Machine (ELM) algorithm considering ridge regression instead of ordinary least squares estimation. The larger the penalty parameter, the greater the amount of smoothing.

+ Source Code


Image Segmentation with K-Means

Image pixels grouping into k different clusters using the k-means algorithm. A different color is assigned for each cluster. This simulation is based on the following post: R-bloggers.

+ Source Code


Image Reconstruction with Principal Components Analysis

Image reconstruction using the k first principal components (PCs).

+ Source Code



Developed by David Pinto