public final class PCA extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PCA.TransformationType
Type of the possible data transformation.
|
| Constructor and Description |
|---|
PCA(Jama.Matrix data)
Create the PCA transformation.
|
PCA(Jama.Matrix data,
boolean center)
Create the PCA transformation.
|
PCA(Jama.Matrix data,
CovarianceMatrixEVDCalculator evdCalc)
Create the PCA transformation.
|
PCA(Jama.Matrix data,
CovarianceMatrixEVDCalculator evdCalc,
boolean center)
Create the PCA transformation
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
belongsToGeneratedSubspace(Jama.Matrix pt)
Check if given point lies in PCA-generated subspace.
|
static Jama.Matrix |
calculateCovarianceMatrix(Jama.Matrix data)
Function for JUnit testing purposes only
|
double |
getEigenvalue(int dimNo)
Get selected eigenvalue
|
Jama.Matrix |
getEigenvectorsMatrix() |
int |
getInputDimsNo()
Get number of dimensions of the input vectors
|
int |
getOutputDimsNo()
Get number of dimensions of the output vectors
|
Jama.Matrix |
transform(Jama.Matrix data,
PCA.TransformationType type)
Execute selected transformation on given data.
|
public PCA(Jama.Matrix data)
data - data matrix used to compute the PCA transformation.
Rows of the matrix are the instances/samples, columns are dimensions.
It is assumed that the matrix is already centered.public PCA(Jama.Matrix data,
boolean center)
data - data matrix used to compute the PCA transformation.
Rows of the matrix are the instances/samples, columns are dimensions.center - should the data matrix be centered before doing the
calculations?public PCA(Jama.Matrix data,
CovarianceMatrixEVDCalculator evdCalc)
data - data matrix used to compute the PCA transformation.
Rows of the matrix are the instances/samples, columns are dimensions.
It is assumed that the matrix is already centered.evdCalc - method of computing eigenvalue decomposition of data's
covariance matrixpublic PCA(Jama.Matrix data,
CovarianceMatrixEVDCalculator evdCalc,
boolean center)
data - data matrix used to compute the PCA transformation.
Rows of the matrix are the instances/samples, columns are dimensions.evdCalc - method of computing eigenvalue decomposition of data's
covariance matrixcenter - should the data matrix be centered before doing the
calculations?public Jama.Matrix getEigenvectorsMatrix()
public double getEigenvalue(int dimNo)
dimNo - dimension number corresponding to given eigenvaluepublic int getInputDimsNo()
public int getOutputDimsNo()
public Jama.Matrix transform(Jama.Matrix data,
PCA.TransformationType type)
data - data to transform. Rows of the matrix are the
instances/samples, columns are dimensions.
If the original PCA data matrix was set to be centered, this
matrix will also be centered using the same parameters.type - transformation to applypublic boolean belongsToGeneratedSubspace(Jama.Matrix pt)
pt - point. If the original PCA data matrix was set to be centered,
this point will also be centered using the same parameters.public static Jama.Matrix calculateCovarianceMatrix(Jama.Matrix data)
DMelt 2.0 © DataMelt by jWork.ORG