public class RandomProjection extends Object implements Projection<double[]>
Fortunately, we can reduce the dimension of the data far more drastically for the particular case of mixtures of Gaussians. In fact, we can map the data into just d = O(log k) dimensions, where k is the number of Gaussians. Therefore, the amount of data we will need is only polynomial in k. Note that this projected dimension is independent of the number of data points and of their original dimension. Experiments show that a value of log k works nicely.
Besides, even if the original clusters are highly eccentric (that is, far from spherical), random projection will make them more spherical. Note that eccentric clusters are problematic for the EM algorithm because intermediate covariance matrices may become singular or close to singular. Note that for high enough dimension, almost the entire Gaussian distribution lies in a thin shell.
Constructor and Description |
---|
RandomProjection(int n,
int p)
Constructor.
|
RandomProjection(int n,
int p,
boolean sparse)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
getProjection()
Returns the projection matrix.
|
double[] |
project(double[] x)
Project a data point to the feature space.
|
double[][] |
project(double[][] x)
Project a set of data toe the feature space.
|
public RandomProjection(int n, int p)
n
- the dimension of input space.p
- the dimension of feature space.public RandomProjection(int n, int p, boolean sparse)
n
- the dimension of input space.p
- the dimension of feature space.sparse
- true to generate a sparse random projection proposed by Achlioptas.public double[][] getProjection()
public double[] project(double[] x)
Projection
project
in interface Projection<double[]>
public double[][] project(double[][] x)
Projection
project
in interface Projection<double[]>
Copyright © 2015. All rights reserved.