Source

Sparse Random Projector#

The Sparse Random Projector uses a random matrix sampled from a sparse Gaussian distribution (mostly 0s) to reduce the dimensionality of a dataset.

Interfaces: Transformer, Stateful

Data Type Compatibility: Continuous only

Parameters#

# Param Default Type Description
1 dimensions int The number of target dimensions to project onto.

Additional Methods#

Calculate the minimum dimensionality needed given total sample size and max distortion using the Johnson-Lindenstrauss lemma:

public static minDimensions(int $n, float $maxDistortion = 0.1) : int

Example#

use Rubix\ML\Transformers\SparseRandomProjector;

$transformer = new SparseRandomProjector(30);

References#

  • D. Achlioptas. (2003). Database-friendly random projections: Johnson-Lindenstrauss with binary coins.