public class FeatureVectorPCA extends org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis
FeatureVectors.org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis.ComponentSelector, org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis.EnergyThresholdComponentSelector, org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis.NumberComponentSelector, org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis.PercentageEnergyComponentSelector| Constructor and Description |
|---|
FeatureVectorPCA()
Default constructor, using an
SvdPrincipalComponentAnalysis. |
FeatureVectorPCA(org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis inner)
Construct with the given
PrincipalComponentAnalysis object. |
| Modifier and Type | Method and Description |
|---|---|
DoubleFV |
generate(DoubleFV scalings)
Generate a new "observation" as a linear combination of the principal
components (PC): mean + PC * scaling.
|
void |
learnBasis(Collection<? extends FeatureVector> data)
Learn the PCA basis of the given feature vectors.
|
void |
learnBasis(double[][] data) |
void |
learnBasis(FeatureVector[] data)
Learn the PCA basis of the given feature vectors.
|
protected void |
learnBasisNorm(Jama.Matrix norm) |
DoubleFV |
project(FeatureVector vector)
Project a vector by the basis.
|
buildNormalisedDataMatrix, generate, getBasis, getCumulativeEnergies, getCumulativeEnergy, getEigenValue, getEigenValues, getEigenVectors, getMean, getPrincipalComponent, getStandardDeviations, getStandardDeviations, learnBasis, learnBasis, project, project, selectSubset, selectSubset, selectSubsetEnergyThreshold, selectSubsetPercentageEnergy, toStringpublic FeatureVectorPCA()
SvdPrincipalComponentAnalysis.public FeatureVectorPCA(org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysis inner)
PrincipalComponentAnalysis object.inner - PCA algorithm.public void learnBasis(FeatureVector[] data)
data - the feature vectors to apply PCA to.public void learnBasis(Collection<? extends FeatureVector> data)
data - the feature vectors to apply PCA to.public DoubleFV project(FeatureVector vector)
vector - the vector to projectpublic void learnBasis(double[][] data)
learnBasis in class org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysisprotected void learnBasisNorm(Jama.Matrix norm)
learnBasisNorm in class org.openimaj.math.matrix.algorithm.pca.PrincipalComponentAnalysispublic DoubleFV generate(DoubleFV scalings)
scalings - the weighting for each PC