Skip to content

Commit

Permalink
Fix python test
Browse files Browse the repository at this point in the history
  • Loading branch information
Feynman Liang committed Jun 26, 2015
1 parent ce987cb commit 0d3e4b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/mllib/fpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class FPGrowthModel(JavaModelWrapper):
>>> data = [["a", "b", "c"], ["a", "b", "d", "e"], ["a", "c", "e"], ["a", "c", "f"]]
>>> rdd = sc.parallelize(data, 2)
>>> model = FPGrowth.train(rdd, 0.6, 2)
>>> sorted(model.freqItemsets().collect())
[FreqItemset(items=[u'a'], freq=4), FreqItemset(items=[u'c'], freq=3), ...
>>> sorted(model.freqItemsets().collect(), key=lambda x: x.items)
[FreqItemset(items=[u'a'], freq=4), FreqItemset(items=[u'a', u'c'], freq=3), ...
"""

def freqItemsets(self):
Expand Down

0 comments on commit 0d3e4b6

Please sign in to comment.