Class 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 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