Skip to content

Commit ec21f7d

Browse files
author
Jacky Li
committed
fix scalastyle
1 parent 93f3280 commit ec21f7d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

mllib/src/main/scala/org/apache/spark/mllib/fpm/FPGrowth.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ import org.apache.spark.rdd.RDD
2929
* This class implements Parallel FP-growth algorithm to do frequent pattern matching on input data.
3030
* Parallel FPGrowth (PFP) partitions computation in such a way that each machine executes an
3131
* independent group of mining tasks. More detail of this algorithm can be found at
32-
* [[http://dx.doi.org/10.1145/1454008.1454027, PFP]], and the original FP-growth paper can be found at
33-
* [[http://dx.doi.org/10.1145/335191.335372, FP-growth]]
32+
* [[http://dx.doi.org/10.1145/1454008.1454027, PFP]], and the original FP-growth paper can be
33+
* found at [[http://dx.doi.org/10.1145/335191.335372, FP-growth]]
3434
*
35-
* @param minSupport the minimal support level of the frequent pattern, any pattern appears more than
36-
* (minSupport * size-of-the-dataset) times will be output
35+
* @param minSupport the minimal support level of the frequent pattern, any pattern appears
36+
* more than (minSupport * size-of-the-dataset) times will be output
3737
*/
3838
class FPGrowth private(private var minSupport: Double) extends Logging with Serializable {
3939

mllib/src/main/scala/org/apache/spark/mllib/fpm/FPTree.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class FPTree extends Serializable {
6464
* @return root node after merge
6565
*/
6666
private def mergeTree(tree1: FPTreeNode, tree2: FPTreeNode): FPTreeNode = {
67-
// firstly merge two roots, then iterate on the second tree, merge all children of it to the first tree
67+
// firstly merge two roots, then iterate on the second tree, merge all
68+
// children of it to the first tree
6869
require(tree1 != null)
6970
require(tree2 != null)
7071
if (!tree2.isRoot) {
@@ -108,7 +109,8 @@ class FPTree extends Serializable {
108109
}
109110

110111
/**
111-
* This function will walk through the tree and build all conditional pattern base out of it
112+
* This function will walk through the tree and build all conditional pattern
113+
* base out of it
112114
* @param tree the tree to expand
113115
* @return conditional pattern base
114116
*/
@@ -187,7 +189,8 @@ class FPTree extends Serializable {
187189
val lineCom = v.toList.combinations(k)
188190
lineComListBuffer ++= lineCom.toList
189191
} else {
190-
/* if each value length > k,it need calculate the intersect of each value & before combinations */
192+
// if each value length > k,it need calculate the intersect of each
193+
// value & before combinations
191194
val union_lineComListTemp2v = v intersect lineComListTempBuffer.toArray.array
192195
// calculate each value combinations after intersect
193196
if (union_lineComListTemp2v.length >= k) {

0 commit comments

Comments
 (0)