Skip to content
Snippets Groups Projects
Commit d5ab42ce authored by Yuhao Yang's avatar Yuhao Yang Committed by Sean Owen
Browse files

[SPARK-14916][MLLIB] A more friendly tostring for FreqItemset in mllib.fpm

## What changes were proposed in this pull request?

jira: https://issues.apache.org/jira/browse/SPARK-14916
FreqItemset as the result of FPGrowth should have a more friendly toString(), to help users and developers.
sample:
{a, b}: 5
{x, y, z}: 4

## How was this patch tested?

existing unit tests.

Author: Yuhao Yang <hhbyyh@gmail.com>

Closes #12698 from hhbyyh/freqtos.
parent 5ee72454
No related branches found
No related tags found
No related merge requests found
......@@ -327,5 +327,9 @@ object FPGrowth {
def javaItems: java.util.List[Item] = {
items.toList.asJava
}
override def toString: String = {
s"${items.mkString("{", ",", "}")}: $freq"
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment