jhplot.stat
Class PCA
- java.lang.Object
-
- jhplot.stat.PCA
-
public class PCA extends java.lang.Object
Perform a principle component analysis
-
-
Constructor Summary
Constructors Constructor and Description PCA(double[][] xy)
Initialize 2D PCA analysisPCA(P1D p1d)
Perform PCA analysis using P1D object (in 2D).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[][]
center_reduce(double[][] x)
void
doc()
Show online documentation.void
eval()
double
getCoordinate(int k, int i)
Positions of the last coordinates of the projection vectors (eigenvectors)double[][]
getCovariance()
Get covariance matrixdouble[]
getD()
Get transposedouble
getEigenvalue(int k)
Information about eigenvaluesdouble
getEigenvalueTot(int k)
Express eigenvalues as percentage of totaldouble
getMean(int k)
Get means for the component kdouble
getStd(int k)
Get standard deviationsjava.lang.String
getSummary()
Return projection vectors and information per projection vector.double[]
inv_center_reduce(double[] y)
double[][]
inv_center_reduce(double[][] y)
static void
main(java.lang.String[] args)
-
-
-
Constructor Detail
-
PCA
public PCA(double[][] xy)
Initialize 2D PCA analysis- Parameters:
xy
- array in X
-
PCA
public PCA(P1D p1d)
Perform PCA analysis using P1D object (in 2D). All weights for points are set to 1. X and Y component of P1D are used for the PCA.- Parameters:
p1d
- P1D input objects
-
-
Method Detail
-
eval
public void eval()
-
center_reduce
public double[][] center_reduce(double[][] x)
-
inv_center_reduce
public double[] inv_center_reduce(double[] y)
-
inv_center_reduce
public double[][] inv_center_reduce(double[][] y)
-
getSummary
public java.lang.String getSummary()
Return projection vectors and information per projection vector.- Returns:
- text
-
getEigenvalue
public double getEigenvalue(int k)
Information about eigenvalues- Parameters:
k
- - integer value (axis index of the projection)- Returns:
-
getEigenvalueTot
public double getEigenvalueTot(int k)
Express eigenvalues as percentage of total- Parameters:
k
- integer value (axis index of the projection)- Returns:
-
getCoordinate
public double getCoordinate(int k, int i)
Positions of the last coordinates of the projection vectors (eigenvectors)- Parameters:
k
- - integer value (axis index)i
- - index (position)- Returns:
-
getCovariance
public double[][] getCovariance()
Get covariance matrix- Returns:
-
getD
public double[] getD()
Get transpose- Returns:
-
getMean
public double getMean(int k)
Get means for the component k- Parameters:
k
- index of the axis- Returns:
-
getStd
public double getStd(int k)
Get standard deviations- Parameters:
k
- index of the axis- Returns:
-
main
public static void main(java.lang.String[] args)
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG