V
- Vector typepublic class PCARunner<V extends NumberVector<? extends V,?>> extends Object implements Parameterizable
Modifier and Type | Class and Description |
---|---|
static class |
PCARunner.Parameterizer<V extends NumberVector<? extends V,?>>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected CovarianceMatrixBuilder<V> |
covarianceMatrixBuilder
The covariance computation class.
|
static OptionID |
PCA_COVARIANCE_MATRIX
Parameter to specify the class to compute the covariance matrix, must be a
subclass of
CovarianceMatrixBuilder . |
Constructor and Description |
---|
PCARunner(CovarianceMatrixBuilder<V> covarianceMatrixBuilder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CovarianceMatrixBuilder<V> |
getCovarianceMatrixBuilder()
Get covariance matrix builder
|
PCAResult |
processCovarMatrix(Matrix covarMatrix)
Process an existing covariance Matrix
|
PCAResult |
processDatabase(Relation<? extends V> database)
Run PCA on the complete database
|
PCAResult |
processEVD(EigenvalueDecomposition evd)
Process an existing eigenvalue decomposition
|
PCAResult |
processIds(DBIDs ids,
Relation<? extends V> database)
Run PCA on a collection of database IDs
|
<D extends NumberDistance<?,?>> |
processQueryResult(Collection<DistanceResultPair<D>> results,
Relation<? extends V> database)
Run PCA on a QueryResult Collection
|
void |
setCovarianceMatrixBuilder(CovarianceMatrixBuilder<V> covarianceBuilder)
Set covariance matrix builder.
|
public static final OptionID PCA_COVARIANCE_MATRIX
CovarianceMatrixBuilder
.
Default value: CovarianceMatrixBuilder
Key: -pca.covariance
protected CovarianceMatrixBuilder<V extends NumberVector<? extends V,?>> covarianceMatrixBuilder
public PCARunner(CovarianceMatrixBuilder<V> covarianceMatrixBuilder)
covarianceMatrixBuilder
- Class for computing the covariance matrixpublic PCAResult processDatabase(Relation<? extends V> database)
database
- the database usedpublic PCAResult processIds(DBIDs ids, Relation<? extends V> database)
ids
- a collection of idsdatabase
- the database usedpublic <D extends NumberDistance<?,?>> PCAResult processQueryResult(Collection<DistanceResultPair<D>> results, Relation<? extends V> database)
results
- a collection of QueryResultsdatabase
- the database usedpublic PCAResult processCovarMatrix(Matrix covarMatrix)
covarMatrix
- the matrix used for performing pcapublic PCAResult processEVD(EigenvalueDecomposition evd)
evd
- eigenvalue decomposition to usepublic CovarianceMatrixBuilder<V> getCovarianceMatrixBuilder()
public void setCovarianceMatrixBuilder(CovarianceMatrixBuilder<V> covarianceBuilder)
covarianceBuilder
- New covariance matrix builder.