Class PearsonCorrelation
Object
org.apache.spark.mllib.stat.correlation.PearsonCorrelation
Compute Pearson correlation for two RDDs of the type RDD[Double] or the correlation matrix
for an RDD of the type RDD[Vector].
Definition of Pearson correlation can be found at http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecomputeCorrelation(RDD<Object> x, RDD<Object> y) Compute the Pearson correlation for two datasets.static MatrixCompute the Pearson correlation matrix S, for the input matrix, where S(i, j) is the correlation between column i and j.static MatrixcomputeCorrelationMatrixFromCovariance(Matrix covarianceMatrix) Compute the Pearson correlation matrix from the covariance matrix.static doublestatic org.apache.spark.internal.Logging.LogStringContextLogStringContext(scala.StringContext sc) static org.slf4j.Loggerstatic voidorg$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)
-
Constructor Details
-
PearsonCorrelation
public PearsonCorrelation()
-
-
Method Details
-
computeCorrelation
Compute the Pearson correlation for two datasets. NaN if either vector has 0 variance.- Parameters:
x- (undocumented)y- (undocumented)- Returns:
- (undocumented)
-
computeCorrelationMatrix
Compute the Pearson correlation matrix S, for the input matrix, where S(i, j) is the correlation between column i and j. 0 covariance results in a correlation value of Double.NaN.- Parameters:
X- (undocumented)- Returns:
- (undocumented)
-
computeCorrelationMatrixFromCovariance
Compute the Pearson correlation matrix from the covariance matrix. 0 variance results in a correlation value of Double.NaN.- Parameters:
covarianceMatrix- (undocumented)- Returns:
- (undocumented)
-
computeCorrelationWithMatrixImpl
-
org$apache$spark$internal$Logging$$log_
public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_() -
org$apache$spark$internal$Logging$$log__$eq
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) -
LogStringContext
public static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc)
-