de.lmu.ifi.dbs.elki.math.linearalgebra.pca
Class PCAFilteredRunner<V extends NumberVector<? extends V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PCARunner<V>
      extended by de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PCAFilteredRunner<V>
Type Parameters:
V - Vector class to use
All Implemented Interfaces:
InspectionUtilFrequentlyScanned, Parameterizable

public class PCAFilteredRunner<V extends NumberVector<? extends V,?>>
extends PCARunner<V>

PCA runner that will do dimensionality reduction. PCA is computed as with the regular runner, but afterwards, an EigenPairFilter is applied.


Nested Class Summary
static class PCAFilteredRunner.Parameterizer<V extends NumberVector<? extends V,?>>
          Parameterization class.
 
Field Summary
private  double big
          Holds the value of BIG_ID.
static OptionID BIG_ID
          Parameter to specify a constant big value to reset high eigenvalues, must be a double greater than 0.
private  EigenPairFilter eigenPairFilter
          Holds the instance of the EigenPairFilter specified by PCA_EIGENPAIR_FILTER.
static OptionID PCA_EIGENPAIR_FILTER
          Parameter to specify the filter for determination of the strong and weak eigenvectors, must be a subclass of EigenPairFilter.
private  double small
          Holds the value of SMALL_ID.
static OptionID SMALL_ID
          Parameter to specify a constant small value to reset low eigenvalues, must be a double greater than 0.
 
Fields inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PCARunner
covarianceMatrixBuilder, PCA_COVARIANCE_MATRIX
 
Constructor Summary
PCAFilteredRunner(CovarianceMatrixBuilder<V> covarianceMatrixBuilder, EigenPairFilter eigenPairFilter, double big, double small)
          Constructor.
 
Method Summary
protected  EigenPairFilter getEigenPairFilter()
          Retrieve the EigenPairFilter to be used.
 PCAFilteredResult processCovarMatrix(Matrix covarMatrix)
          Process an existing Covariance Matrix
 PCAFilteredResult processEVD(EigenvalueDecomposition evd)
          Process an existing eigenvalue decomposition
 PCAFilteredResult processIds(DBIDs ids, Relation<? extends V> database)
          Run PCA on a collection of database IDs
<D extends NumberDistance<?,?>>
PCAFilteredResult
processQueryResult(Collection<DistanceResultPair<D>> results, Relation<? extends V> database)
          Run PCA on a QueryResult Collection
 
Methods inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PCARunner
getCovarianceMatrixBuilder, processDatabase, setCovarianceMatrixBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PCA_EIGENPAIR_FILTER

public static final OptionID PCA_EIGENPAIR_FILTER
Parameter to specify the filter for determination of the strong and weak eigenvectors, must be a subclass of EigenPairFilter.

Default value: PercentageEigenPairFilter

Key: -pca.filter


BIG_ID

public static final OptionID BIG_ID
Parameter to specify a constant big value to reset high eigenvalues, must be a double greater than 0.

Default value: 1.0

Key: -pca.big


SMALL_ID

public static final OptionID SMALL_ID
Parameter to specify a constant small value to reset low eigenvalues, must be a double greater than 0.

Default value: 0.0

Key: -pca.small


eigenPairFilter

private EigenPairFilter eigenPairFilter
Holds the instance of the EigenPairFilter specified by PCA_EIGENPAIR_FILTER.


big

private double big
Holds the value of BIG_ID.


small

private double small
Holds the value of SMALL_ID.

Constructor Detail

PCAFilteredRunner

public PCAFilteredRunner(CovarianceMatrixBuilder<V> covarianceMatrixBuilder,
                         EigenPairFilter eigenPairFilter,
                         double big,
                         double small)
Constructor.

Parameters:
covarianceMatrixBuilder -
eigenPairFilter -
big -
small -
Method Detail

processIds

public PCAFilteredResult processIds(DBIDs ids,
                                    Relation<? extends V> database)
Run PCA on a collection of database IDs

Overrides:
processIds in class PCARunner<V extends NumberVector<? extends V,?>>
Parameters:
ids - a collection of ids
database - the database used
Returns:
PCA result

processQueryResult

public <D extends NumberDistance<?,?>> PCAFilteredResult processQueryResult(Collection<DistanceResultPair<D>> results,
                                                                            Relation<? extends V> database)
Run PCA on a QueryResult Collection

Overrides:
processQueryResult in class PCARunner<V extends NumberVector<? extends V,?>>
Parameters:
results - a collection of QueryResults
database - the database used
Returns:
PCA result

processCovarMatrix

public PCAFilteredResult processCovarMatrix(Matrix covarMatrix)
Process an existing Covariance Matrix

Overrides:
processCovarMatrix in class PCARunner<V extends NumberVector<? extends V,?>>
Parameters:
covarMatrix - the matrix used for performing PCA
Returns:
PCA result

processEVD

public PCAFilteredResult processEVD(EigenvalueDecomposition evd)
Process an existing eigenvalue decomposition

Overrides:
processEVD in class PCARunner<V extends NumberVector<? extends V,?>>
Parameters:
evd - eigenvalue decomposition to use
Returns:
PCA result

getEigenPairFilter

protected EigenPairFilter getEigenPairFilter()
Retrieve the EigenPairFilter to be used. For derived PCA Runners

Returns:
eigenpair filter configured.

Release 0.4.0 (2011-09-20_1324)