@@ -37,7 +37,7 @@ final class DataFrameStatFunctions private[sql](df: DataFrame) {
3737 StatFunctions .calculateCov(df, Seq (col1, col2))
3838 }
3939
40- /*
40+ /**
4141 * Calculates the correlation of two columns of a DataFrame. Currently only supports the Pearson
4242 * Correlation Coefficient. For Spearman Correlation, consider using RDD methods found in
4343 * MLlib's Statistics.
@@ -75,7 +75,7 @@ final class DataFrameStatFunctions private[sql](df: DataFrame) {
7575 * each row.
7676 * @param col2 The name of the second column. Distinct items will make the column names
7777 * of the DataFrame.
78- * @return A Local DataFrame containing the table
78+ * @return A DataFrame containing for the contingency table.
7979 */
8080 def crosstab (col1 : String , col2 : String ): DataFrame = {
8181 StatFunctions .crossTabulate(df, col1, col2)
@@ -110,14 +110,25 @@ final class DataFrameStatFunctions private[sql](df: DataFrame) {
110110 }
111111
112112 /**
113- * Python friendly implementation for `freqItems`
113+ * (Scala-specific) Finding frequent items for columns, possibly with false positives. Using the
114+ * frequent element count algorithm described in
115+ * [[http://dx.doi.org/10.1145/762471.762473, proposed by Karp, Schenker, and Papadimitriou ]].
116+ *
117+ * @param cols the names of the columns to search frequent items in.
118+ * @return A Local DataFrame with the Array of frequent items for each column.
114119 */
115120 def freqItems (cols : Seq [String ], support : Double ): DataFrame = {
116121 FrequentItems .singlePassFreqItems(df, cols, support)
117122 }
118123
119124 /**
120- * Python friendly implementation for `freqItems` with a default `support` of 1%.
125+ * (Scala-specific) Finding frequent items for columns, possibly with false positives. Using the
126+ * frequent element count algorithm described in
127+ * [[http://dx.doi.org/10.1145/762471.762473, proposed by Karp, Schenker, and Papadimitriou ]].
128+ * Uses a `default` support of 1%.
129+ *
130+ * @param cols the names of the columns to search frequent items in.
131+ * @return A Local DataFrame with the Array of frequent items for each column.
121132 */
122133 def freqItems (cols : Seq [String ]): DataFrame = {
123134 FrequentItems .singlePassFreqItems(df, cols, 0.01 )
0 commit comments