diff options
author | Yu ISHIKAWA <yuu.ishikawa@gmail.com> | 2015-09-17 08:50:46 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-09-17 08:50:46 -0700 |
commit | c74d38fd8faf8cba981cf934341d24b9a3167025 (patch) | |
tree | c787e083b2da4fd0872cecc8656ccc3f76f67ed6 /python/pyspark/mllib | |
parent | 4a0b56e8dbb3713b16e58738201d838ffc4b258b (diff) | |
download | spark-c74d38fd8faf8cba981cf934341d24b9a3167025.tar.gz spark-c74d38fd8faf8cba981cf934341d24b9a3167025.tar.bz2 spark-c74d38fd8faf8cba981cf934341d24b9a3167025.zip |
[SPARK-10274] [MLLIB] Add @since annotation to pyspark.mllib.fpm
Author: Yu ISHIKAWA <yuu.ishikawa@gmail.com>
Closes #8665 from yu-iskw/SPARK-10274.
Diffstat (limited to 'python/pyspark/mllib')
-rw-r--r-- | python/pyspark/mllib/fpm.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/python/pyspark/mllib/fpm.py b/python/pyspark/mllib/fpm.py index bdc4a132b1..bdabba9602 100644 --- a/python/pyspark/mllib/fpm.py +++ b/python/pyspark/mllib/fpm.py @@ -19,7 +19,7 @@ import numpy from numpy import array from collections import namedtuple -from pyspark import SparkContext +from pyspark import SparkContext, since from pyspark.rdd import ignore_unicode_prefix from pyspark.mllib.common import JavaModelWrapper, callMLlibFunc, inherit_doc @@ -41,8 +41,11 @@ class FPGrowthModel(JavaModelWrapper): >>> model = FPGrowth.train(rdd, 0.6, 2) >>> sorted(model.freqItemsets().collect()) [FreqItemset(items=[u'a'], freq=4), FreqItemset(items=[u'c'], freq=3), ... + + .. versionadded:: 1.4.0 """ + @since("1.4.0") def freqItemsets(self): """ Returns the frequent itemsets of this model. @@ -55,9 +58,12 @@ class FPGrowth(object): .. note:: Experimental A Parallel FP-growth algorithm to mine frequent itemsets. + + .. versionadded:: 1.4.0 """ @classmethod + @since("1.4.0") def train(cls, data, minSupport=0.3, numPartitions=-1): """ Computes an FP-Growth model that contains frequent itemsets. @@ -74,6 +80,8 @@ class FPGrowth(object): class FreqItemset(namedtuple("FreqItemset", ["items", "freq"])): """ Represents an (items, freq) tuple. + + .. versionadded:: 1.4.0 """ |