Skip to content

Commit a2d7cf7

Browse files
committed
add doc for FPGrowth.train()
1 parent dcf7d73 commit a2d7cf7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/pyspark/mllib/fpm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ class FPGrowth(object):
5555

5656
@classmethod
5757
def train(cls, data, minSupport=0.3, numPartitions=-1):
58+
"""
59+
Computes an FP-Growth model that contains frequent itemsets.
60+
:param data: The input data set, each element contains a transaction.
61+
:param minSupport: The minimal support level (default: `0.3`).
62+
:param numPartitions: The number of partitions used by parallel FP-growth
63+
(default: same as input data).
64+
"""
5865
model = callMLlibFunc("trainFPGrowthModel", data, float(minSupport), int(numPartitions))
5966
return FPGrowthModel(model)
6067

0 commit comments

Comments
 (0)