Skip to content

kayoyin/signal-processing

Repository files navigation

signal-processing

This repository gathers implementations of machine learning algorithms for signal processing using Python from scratch.

Coming next: isomap, and locally linear embedding (LLE) for dimensionality reduction with manifold learning.

Dimensionality Reduction

The following will run the PCA demo from the first article:

python -c 'from dimensionality_reduction import demo; demo()'

This performs PCA on the 982 MNIST images of the number 4, and saves a sample reconstruction from reduced images with 2, 16, 64 and 256 principal components.

Input image: Original image

Reconstruction with 2, 16, 64, 128 principal components: 2 image Original image Original image Original image

Manifold learning

Isomap and LLE are implemented for manifold learning. The following will run the demo from the second article:

python dimensionality_reduction.py

This performs PCA, Isomap and LLE on the 892 MNIST images of the number 5 and saves the 2D projection of the data points.

PCA projection: Original image

Isomap projection: Original image

LLE projection: Original image

Source Separation

Independent Components Analysis and Nonnegative Matrix Factorization are implemented for source separation. The following will run the demo:

python source_separation.py

This performs ICA and NMF on 1000 MNIST images of the numbers 0, 1, 4, 7 that have been mixed together with varying ratio, and saves the extracted source images.

Input images: Mixed image Mixed image 2 Mixed image 3 Mixed image 4

Source separation with ICA: ICA 1 Ica 2 ICA 3 Ica 4

Source separation with NMF: ICA 1 Ica 2 ICA 3 Ica 4