comirva.util
Class PCA

java.lang.Object
  extended by comirva.util.PCA

public class PCA
extends Object

This class implements the projection of a data set with a Principal Components Analysis.


Constructor Summary
PCA(DataMatrix data, int dim)
          Creates a new Principal Components Analysis (PCA) and calculates it using the data matrix data as input.
PCA(double[][] data, int dim)
          Creates a new Principal Components Analysis (PCA) and calculates it using the data matrix data as input.
PCA(Jama.Matrix m, int dim)
          Creates a new Principal Components Analysis (PCA) and calculates it using the Jama Matrix m as input.
 
Method Summary
 double[] getEigenvalues()
           
 DataMatrix getEigenvaluesAsDataMatrix()
           
 DataMatrix getEigenvectorsAsDataMatrix()
           
 double[][] getEigenvectorsAsDoubleArray()
           
 Jama.Matrix getEigenvectorsAsMatrix()
           
 double[] getMeans()
           
 DataMatrix getMeansAsDataMatrix()
           
 DataMatrix getPCATransformedDataAsDataMatrix()
           
 double[][] getPCATransformedDataAsDoubleArray()
           
 Jama.Matrix getPCATransformedDataAsMatrix()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCA

public PCA(Jama.Matrix m,
           int dim)
Creates a new Principal Components Analysis (PCA) and calculates it using the Jama Matrix m as input. Furthermore, the projection of the input data to a space of dimensionality dim is performed.

Parameters:
m - a Matrix representing the input data
dim - the number of dimensions onto which the input data is to be projected

PCA

public PCA(double[][] data,
           int dim)
Creates a new Principal Components Analysis (PCA) and calculates it using the data matrix data as input. Furthermore, the projection of the input data to a space of dimensionality dim is performed.

Parameters:
data - a double[][] representing the input data
dim - the number of dimensions onto which the input data is to be projected

PCA

public PCA(DataMatrix data,
           int dim)
Creates a new Principal Components Analysis (PCA) and calculates it using the data matrix data as input. Furthermore, the projection of the input data to a space of dimensionality dim is performed.

Parameters:
data - a DataMatrix representing the input data
dim - the number of dimensions onto which the input data is to be projected
Method Detail

getPCATransformedDataAsDoubleArray

public double[][] getPCATransformedDataAsDoubleArray()

getPCATransformedDataAsMatrix

public Jama.Matrix getPCATransformedDataAsMatrix()

getPCATransformedDataAsDataMatrix

public DataMatrix getPCATransformedDataAsDataMatrix()

getEigenvectorsAsDoubleArray

public double[][] getEigenvectorsAsDoubleArray()

getEigenvectorsAsMatrix

public Jama.Matrix getEigenvectorsAsMatrix()

getEigenvectorsAsDataMatrix

public DataMatrix getEigenvectorsAsDataMatrix()

getEigenvalues

public double[] getEigenvalues()

getEigenvaluesAsDataMatrix

public DataMatrix getEigenvaluesAsDataMatrix()

getMeans

public double[] getMeans()

getMeansAsDataMatrix

public DataMatrix getMeansAsDataMatrix()