A builder object that provides summary statistics about a given column.
Users should not directly create such builders, but instead use one of the methods in
:: Experimental ::
Chi-square hypothesis testing for categorical data.
See Wikipedia for more information
on the Chi-squared test.
API for correlation functions in MLlib, compatible with DataFrames and Datasets.
The functions in this package generalize the functions in org.apache.spark.sql.Dataset#stat
to spark.ml's Vector types.
Conduct the two-sided Kolmogorov Smirnov (KS) test for data sampled from a
continuous distribution. By comparing the largest difference between the empirical cumulative
distribution of the sample data and the theoretical distribution we can provide a test for the
the null hypothesis that the sample data comes from that theoretical distribution.
For more information on KS Test:
Kolmogorov-Smirnov test (Wikipedia)
Tools for vectorized statistics on MLlib Vectors.
The methods in this package provide various statistics for Vectors contained inside DataFrames.
This class lets users pick the statistics they would like to extract for a given column. Here is
an example in Scala:
val dataframe = ... // Some dataframe containing a feature column and a weight column
val multiStatsDF = dataframe.select(
Summarizer.metrics("min", "max", "count").summary($"features", $"weight")
val Row(Row(minVec, maxVec, count)) = multiStatsDF.first()
If one wants to get a single metric, shortcuts are also available:
val meanDF = dataframe.select(Summarizer.mean($"features"))
val Row(meanVec) = meanDF.first()
Note: Currently, the performance of this interface is about 2x~3x slower than using the RDD