Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.math.linearalgebra.pca
Class PCAResult

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PCAResult
Direct Known Subclasses:
PCAFilteredResult

public class PCAResult
extends Object

Result class for Principal Component Analysis with some convenience methods

Author:
erich

Field Summary
private  SortedEigenPairs eigenPairs
          The eigenpairs in decreasing order.
private  double[] eigenvalues
          The eigenvalues in decreasing order.
private  Matrix eigenvectors
          The eigenvectors in decreasing order to their corresponding eigenvalues.
 
Constructor Summary
PCAResult(double[] eigenvalues, Matrix eigenvectors, SortedEigenPairs eigenPairs)
          Build a PCA result object.
PCAResult(SortedEigenPairs eigenPairs)
          Build a PCA result from an existing set of EigenPairs.
 
Method Summary
 SortedEigenPairs getEigenPairs()
          Returns a copy of the eigenpairs of the object to which this PCA belongs to in decreasing order.
 double[] getEigenvalues()
          Returns a copy of the eigenvalues of the object to which this PCA belongs to in decreasing order.
 Matrix getEigenvectors()
          Returns a copy of the matrix of eigenvectors of the object to which this PCA belongs to.
 int length()
          Returns the number of eigenvectors stored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eigenPairs

private SortedEigenPairs eigenPairs
The eigenpairs in decreasing order.


eigenvalues

private double[] eigenvalues
The eigenvalues in decreasing order.


eigenvectors

private Matrix eigenvectors
The eigenvectors in decreasing order to their corresponding eigenvalues.

Constructor Detail

PCAResult

public PCAResult(double[] eigenvalues,
                 Matrix eigenvectors,
                 SortedEigenPairs eigenPairs)
Build a PCA result object.

Parameters:
eigenvalues - Eigenvalues
eigenvectors - Eigenvector matrix
eigenPairs - Eigenpairs

PCAResult

public PCAResult(SortedEigenPairs eigenPairs)
Build a PCA result from an existing set of EigenPairs.

Parameters:
eigenPairs - existing eigenpairs
Method Detail

getEigenvectors

public final Matrix getEigenvectors()
Returns a copy of the matrix of eigenvectors of the object to which this PCA belongs to.

Returns:
the matrix of eigenvectors

getEigenvalues

public final double[] getEigenvalues()
Returns a copy of the eigenvalues of the object to which this PCA belongs to in decreasing order.

Returns:
the eigenvalues

getEigenPairs

public final SortedEigenPairs getEigenPairs()
Returns a copy of the eigenpairs of the object to which this PCA belongs to in decreasing order.

Returns:
the eigenpairs

length

public final int length()
Returns the number of eigenvectors stored

Returns:
length

Release 0.3 (2010-03-31_1612)