Package elki.math.linearalgebra.pca
Class PCAResult
- java.lang.Object
-
- elki.math.linearalgebra.pca.PCAResult
-
- Direct Known Subclasses:
PCAFilteredResult
public class PCAResult extends java.lang.Object
Result class for Principal Component Analysis with some convenience methods- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private EigenPair[]
eigenPairs
The eigenpairs in decreasing order.private double[]
eigenvalues
The eigenvalues in decreasing order.private double[][]
eigenvectors
The eigenvectors in decreasing order to their corresponding eigenvalues.
-
Constructor Summary
Constructors Constructor Description PCAResult(EigenvalueDecomposition evd)
Constructor from an eigenvalue decomposition.PCAResult(EigenPair[] eigenPairs)
Build a PCA result from an existing set of EigenPairs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EigenPair[]
getEigenPairs()
Returns the eigenpairs of the object to which this PCA belongs to in decreasing order.double[]
getEigenvalues()
Returns the local PCA eigenvalues in decreasing order.double[][]
getEigenvectors()
Returns the local PCA eigenvectors, in rows.private static EigenPair[]
processDecomposition(EigenvalueDecomposition evd)
Convert an eigenvalue decomposition into EigenPair objects.
-
-
-
Field Detail
-
eigenPairs
private EigenPair[] eigenPairs
The eigenpairs in decreasing order.
-
eigenvalues
private double[] eigenvalues
The eigenvalues in decreasing order.
-
eigenvectors
private double[][] eigenvectors
The eigenvectors in decreasing order to their corresponding eigenvalues.
-
-
Constructor Detail
-
PCAResult
public PCAResult(EigenPair[] eigenPairs)
Build a PCA result from an existing set of EigenPairs.- Parameters:
eigenPairs
- existing eigenpairs
-
PCAResult
public PCAResult(EigenvalueDecomposition evd)
Constructor from an eigenvalue decomposition.- Parameters:
evd
- Eigenvalue decomposition
-
-
Method Detail
-
processDecomposition
private static EigenPair[] processDecomposition(EigenvalueDecomposition evd)
Convert an eigenvalue decomposition into EigenPair objects.- Parameters:
evd
- Eigenvalue decomposition- Returns:
- Eigenpairs
-
getEigenvectors
public final double[][] getEigenvectors()
Returns the local PCA eigenvectors, in rows.- Returns:
- eigenvectors of the object.
-
getEigenvalues
public final double[] getEigenvalues()
Returns the local PCA eigenvalues in decreasing order.- Returns:
- the eigenvalues
-
getEigenPairs
public final EigenPair[] getEigenPairs()
Returns the eigenpairs of the object to which this PCA belongs to in decreasing order.- Returns:
- the eigenpairs
-
-