Package elki.math.linearalgebra.pca
Class PCAFilteredResult
- java.lang.Object
-
- elki.math.linearalgebra.pca.PCAResult
-
- elki.math.linearalgebra.pca.PCAFilteredResult
-
public class PCAFilteredResult extends PCAResult
Result class for a filtered PCA. This differs from regular PCA by having the Eigenvalues and Eigenvectors separated into "strong" and "weak" Eigenvectors, and thus a dimension. Usually this will be interpreted as having a "data" subspace and an "error" subspace.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private double
explainedVariance
The amount of Variance explained by strong Eigenvaluesprivate double[][]
m_czech
The dissimilarity matrix.private double[][]
m_hat
The similarity matrix.private double[]
strongEigenvalues
The strong eigenvalues.private double[][]
strongEigenvectors
The strong eigenvectors to their corresponding filtered eigenvalues.private double[]
weakEigenvalues
The weak eigenvalues.private double[][]
weakEigenvectors
The weak eigenvectors to their corresponding filtered eigenvalues.
-
Constructor Summary
Constructors Constructor Description PCAFilteredResult(EigenPair[] eigenPairs, int numstrong, double big, double small)
Construct a result object for the filtered PCA result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
dissimilarityMatrix()
Returns the dissimilarity matrix (M_czech) of this LocalPCA.int
getCorrelationDimension()
Get correlation (subspace) dimensionalitydouble
getExplainedVariance()
Returns explained variancedouble[]
getStrongEigenvalues()
Returns the strong eigenvalues of the object after passing the eigen pair filter.double[][]
getStrongEigenvectors()
Returns the matrix of strong eigenvectors after passing the eigen pair filter.double[]
getWeakEigenvalues()
Returns the weak eigenvalues of the object after passing the eigen pair filter.double[][]
getWeakEigenvectors()
Returns the matrix of weak eigenvectors after passing the eigen pair filter.double[][]
similarityMatrix()
Returns the similarity matrix (M_hat) of this LocalPCA.-
Methods inherited from class elki.math.linearalgebra.pca.PCAResult
getEigenPairs, getEigenvalues, getEigenvectors
-
-
-
-
Field Detail
-
strongEigenvalues
private double[] strongEigenvalues
The strong eigenvalues.
-
strongEigenvectors
private double[][] strongEigenvectors
The strong eigenvectors to their corresponding filtered eigenvalues.
-
weakEigenvalues
private double[] weakEigenvalues
The weak eigenvalues.
-
weakEigenvectors
private double[][] weakEigenvectors
The weak eigenvectors to their corresponding filtered eigenvalues.
-
explainedVariance
private double explainedVariance
The amount of Variance explained by strong Eigenvalues
-
m_hat
private double[][] m_hat
The similarity matrix.
-
m_czech
private double[][] m_czech
The dissimilarity matrix.
-
-
Constructor Detail
-
PCAFilteredResult
public PCAFilteredResult(EigenPair[] eigenPairs, int numstrong, double big, double small)
Construct a result object for the filtered PCA result.- Parameters:
eigenPairs
- All EigenPairsnumstrong
- Number of strong eigenvaluesbig
- large value in selection matrixsmall
- small value in selection matrix
-
-
Method Detail
-
getStrongEigenvectors
public final double[][] getStrongEigenvectors()
Returns the matrix of strong eigenvectors after passing the eigen pair filter.- Returns:
- the matrix of eigenvectors
-
getStrongEigenvalues
public final double[] getStrongEigenvalues()
Returns the strong eigenvalues of the object after passing the eigen pair filter.- Returns:
- the eigenvalues
-
getWeakEigenvectors
public final double[][] getWeakEigenvectors()
Returns the matrix of weak eigenvectors after passing the eigen pair filter.- Returns:
- the matrix of eigenvectors
-
getWeakEigenvalues
public final double[] getWeakEigenvalues()
Returns the weak eigenvalues of the object after passing the eigen pair filter.- Returns:
- the eigenvalues
-
getCorrelationDimension
public final int getCorrelationDimension()
Get correlation (subspace) dimensionality- Returns:
- length of strong eigenvalues
-
getExplainedVariance
public double getExplainedVariance()
Returns explained variance- Returns:
- the variance explained by the strong Eigenvectors
-
similarityMatrix
public double[][] similarityMatrix()
Returns the similarity matrix (M_hat) of this LocalPCA.- Returns:
- the similarity matrix M_hat
-
dissimilarityMatrix
public double[][] dissimilarityMatrix()
Returns the dissimilarity matrix (M_czech) of this LocalPCA.- Returns:
- the dissimilarity matrix M_hat
-
-