Skip to content

A torch implementation of PPCA and MPPCA in sklearn style + experiments (done for PGM course at MVA)

License

Notifications You must be signed in to change notification settings

siemovit/ppca-torch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPCA

Probabilistic PCA (PPCA) + MPPCA written in torch.

Overview

ppca-torch implements in PyTorch the method Probabilistic Principal Component Analysis (PPCA) as described by Tipping & Bishop (1999). It provides also a PCA implementation and the sklearn implementation ("baseline"). Additionaly, it contains also the extension to MPPCA. Examples and notebooks allow to see:

  • comparison between different ways to learn the parameters of the model (convergence and projections)
  • sampling examples from MNIST
  • comparison of projections on PCA vs. PPCA
  • missing values impact with MPPCA

PPCA projections based on different ways to learn model parameters

The repository is organised as follows:

  • src/ppca contains the source code for PPCA, MPPCA and PCA implementations.
  • notebooks contains visual experiments
  • examples show more scripts that enable to test various things like compare the convergence of methods, sample from a model trained on MNIST, compare PCA and PPCA etc.
  • figures have some interesting plots

PPCA samples from MNIST digits at 2, 5, 10, 20, 50 iterations

Quickstart

Dev mode

First, create (python3 -m venv .venv) or activate a virtualenv source .venv/bin/activate.

Then clone the repository and install:

git clone https://github.com/siemovit/ppca.git
cd ppca
pip install -e .

References

Tipping, Michael E., and Christopher M. Bishop. "Probabilistic principal component analysis." Journal of the Royal Statistical Society Series B: Statistical Methodology 61.3 (1999): 611-622.

About

A torch implementation of PPCA and MPPCA in sklearn style + experiments (done for PGM course at MVA)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •