public class Pearson_Correlation
extends java.lang.Object
R= n(ÓXY)-(Óx)(Óy)/ SQRT(ABS(nÓX2-(ÓX)2)(ABS(nÓY2-(ÓY)2))
This class will also compute the covariance matrix (since it is closely related to the correlation matrix)
| Constructor and Description |
|---|
Pearson_Correlation() |
| Modifier and Type | Method and Description |
|---|---|
double |
get_Correlation(double[][] both,
int one,
int two)
This class computes the Pearson's Correlation Coefficient given a double array [] and some indications for the selected columns
|
double |
get_Correlation(double[] one,
double[] two)
This class computes the Pearson's Correlation Coefficient given two double arrays are provided
|
double |
get_Covariance(double[][] both,
int one,
int two)
This class computes the covariance given a double array [] and some indications for the selected columns
|
double |
get_Covariance(double[] one,
double[] two)
This class computes the Covariance given two double arrays are provided
|
double[][] |
getCorrelationMatrix(double[][] data)
This method will produce the Pearson's Correlation matrix
|
double[][] |
getCovarianceMatrix(double[][] data)
This method will produce the Covariancen matrix
|
public double[][] getCorrelationMatrix(double[][] data)
This method will produce the Pearson's Correlation matrix
data - : the double array of variables in [rows][columns]public double get_Correlation(double[] one,
double[] two)
This class computes the Pearson's Correlation Coefficient given two double arrays are provided
one - : the first Array to be providedtwo - : the second Array to be providedpublic double get_Correlation(double[][] both,
int one,
int two)
This class computes the Pearson's Correlation Coefficient given a double array [] and some indications for the selected columns
one - : the index of the first Array to be providedtwo - : the index of the second Array to be providedboth - : double array that holds many arrayspublic double get_Covariance(double[] one,
double[] two)
This class computes the Covariance given two double arrays are provided
one - : the first Array to be providedtwo - : the second Array to be providedpublic double get_Covariance(double[][] both,
int one,
int two)
This class computes the covariance given a double array [] and some indications for the selected columns
one - : the index of the first Array to be providedtwo - : the index of the second Array to be providedboth - : double array that holds many arrayspublic double[][] getCovarianceMatrix(double[][] data)
This method will produce the Covariancen matrix
data - : the double array of variables in [rows][columns]