:: Experimental :: Conduct Pearson's independence test for every feature against the label across the input RDD.
:: Experimental :: Conduct Pearson's independence test for every feature against the label across the input RDD. For each feature, the (feature, label) pairs are converted into a contingency matrix for which the chi-squared statistic is computed. All label and feature values must be categorical.
an RDD[LabeledPoint]
containing the labeled dataset with categorical features.
Real-valued features will be treated as categorical for each distinct value.
an array containing the ChiSquaredTestResult for every feature against the label. The order of the elements in the returned array reflects the order of input features.
:: Experimental :: Conduct Pearson's independence test on the input contingency matrix, which cannot contain negative entries or columns or rows that sum up to 0.
:: Experimental :: Conduct Pearson's independence test on the input contingency matrix, which cannot contain negative entries or columns or rows that sum up to 0.
The contingency matrix (containing either counts or relative frequencies).
ChiSquaredTest object containing the test statistic, degrees of freedom, p-value, the method used, and the null hypothesis.
:: Experimental ::
Conduct Pearson's chi-squared goodness of fit test of the observed data against the uniform
distribution, with each category having an expected frequency of 1 / observed.size
.
:: Experimental ::
Conduct Pearson's chi-squared goodness of fit test of the observed data against the uniform
distribution, with each category having an expected frequency of 1 / observed.size
.
Note: observed
cannot contain negative values.
Vector containing the observed categorical counts/relative frequencies.
ChiSquaredTest object containing the test statistic, degrees of freedom, p-value, the method used, and the null hypothesis.
:: Experimental :: Conduct Pearson's chi-squared goodness of fit test of the observed data against the expected distribution.
:: Experimental :: Conduct Pearson's chi-squared goodness of fit test of the observed data against the expected distribution.
Note: the two input Vectors need to have the same size.
observed
cannot contain negative values.
expected
cannot contain nonpositive values.
Vector containing the observed categorical counts/relative frequencies.
Vector containing the expected categorical counts/relative frequencies.
expected
is rescaled if the expected
sum differs from the observed
sum.
ChiSquaredTest object containing the test statistic, degrees of freedom, p-value, the method used, and the null hypothesis.
:: Experimental :: Computes column-wise summary statistics for the input RDD[Vector].
:: Experimental :: Computes column-wise summary statistics for the input RDD[Vector].
an RDD[Vector] for which column-wise summary statistics are to be computed.
MultivariateStatisticalSummary object containing column-wise summary statistics.
:: Experimental :: Compute the correlation for the input RDDs using the specified method.
:: Experimental ::
Compute the correlation for the input RDDs using the specified method.
Methods currently supported: pearson
(default), spearman
.
Note: the two input RDDs need to have the same number of partitions and the same number of elements in each partition.
RDD[Double] of the same cardinality as y.
RDD[Double] of the same cardinality as x.
String specifying the method to use for computing correlation.
Supported: pearson
(default), spearman
A Double containing the correlation between the two input RDD[Double]s using the specified method.
:: Experimental :: Compute the Pearson correlation for the input RDDs.
:: Experimental :: Compute the Pearson correlation for the input RDDs. Returns NaN if either vector has 0 variance.
Note: the two input RDDs need to have the same number of partitions and the same number of elements in each partition.
RDD[Double] of the same cardinality as y.
RDD[Double] of the same cardinality as x.
A Double containing the Pearson correlation between the two input RDD[Double]s
:: Experimental :: Compute the correlation matrix for the input RDD of Vectors using the specified method.
:: Experimental ::
Compute the correlation matrix for the input RDD of Vectors using the specified method.
Methods currently supported: pearson
(default), spearman
.
Note that for Spearman, a rank correlation, we need to create an RDD[Double] for each column
and sort it in order to retrieve the ranks and then join the columns back into an RDD[Vector],
which is fairly costly. Cache the input RDD before calling corr with method = "spearman"
to
avoid recomputing the common lineage.
an RDD[Vector] for which the correlation matrix is to be computed.
String specifying the method to use for computing correlation.
Supported: pearson
(default), spearman
Correlation matrix comparing columns in X.
:: Experimental :: Compute the Pearson correlation matrix for the input RDD of Vectors.
:: Experimental :: Compute the Pearson correlation matrix for the input RDD of Vectors. Columns with 0 covariance produce NaN entries in the correlation matrix.
an RDD[Vector] for which the correlation matrix is to be computed.
Pearson correlation matrix comparing columns in X.
API for statistical functions in MLlib.