public class PCA
extends java.lang.Object
This class implements the PCA algorithm
Constructor and Description |
---|
PCA(double[][] examplesp)
Constructor of the class
|
Modifier and Type | Method and Description |
---|---|
void |
ComputeParameters()
It computes all necesary parameters
|
double[][] |
DerivingNewData(double[][] selectedEvectors)
It computes the final data
|
double[][] |
getCovarianceMatrix()
It returns the matrix of covariance
|
double[] |
getEigenvalues()
It returns the selected eigenvalues vector
|
double[][] |
getEigenvectors(double percent)
It computes the most representative eigenvectors
|
int |
getNumDimensions()
It returns the number of dimensions
|
public PCA(double[][] examplesp)
Constructor of the class
examplesp
- matrix of instancespublic void ComputeParameters()
It computes all necesary parameters
public double[][] getEigenvectors(double percent)
It computes the most representative eigenvectors
percent
- percentage needed to compute the representative eigenvectorspublic double[][] DerivingNewData(double[][] selectedEvectors)
It computes the final data
selectedEvectors
- selected eigenvectorspublic int getNumDimensions()
It returns the number of dimensions
public double[] getEigenvalues()
It returns the selected eigenvalues vector
public double[][] getCovarianceMatrix()
It returns the matrix of covariance