Crate ppca

Source
Expand description

This crate implements a Probabilistic Principal Component Analysis in pure Rust, based on a legacy Python version, which was just too slow for the job (even with numpy “C code” to spice it up!)

If you want all the comfort that the Python ecosystem can provide, you are welcome to check out the python wrapper in PyPI. However, if you want top performance and great debugging support, this crate is for you.

To get to know more about the PPCA algorithm for missing data, please check the references below:

Structs§

Dataset
Represents a dataset. This is a wrapper over a 2D array of dimensions (n_samples, n_features).
InferredMasked
The inferred probability distribution in the state space of a given sample.
InferredMaskedMix
The inferred probability distribution in the state space of a given sample of a PPCA Mixture Model. This class is the analogous of InferredMasked for the PPCAMix model.
MaskedSample
A data sample with potentially missing values.
PPCAMix
A mixture of PPCA models. Each PPCA model is associated with a prior probability expressed in log-scale. This models allows for modelling of data clustering and non-linear learning of data. However, it will use significantly more memory and is not guaranteed to converge to a global maximum.
PPCAModel
A PPCA model which can infer missing values.
PosteriorSampler
Samples from the posterior distribution of an inferred sample. The sample is smoothed, that is, it does not include the model isotropic noise.
PosteriorSamplerMix
Samples from the posterior distribution of an inferred sample. The sample is smoothed, that is, it does not include the model isotropic noise.
Prior
A prior for the PPCA model. Use this class to mitigate overfit on training (especially on frequently masked dimensions) and to input a priori knowledge on what the PPCA should look like.