You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2015/09/17 17:50:50 UTC
spark git commit: [SPARK-10274] [MLLIB] Add @since annotation to
pyspark.mllib.fpm
Repository: spark
Updated Branches:
refs/heads/master 4a0b56e8d -> c74d38fd8
[SPARK-10274] [MLLIB] Add @since annotation to pyspark.mllib.fpm
Author: Yu ISHIKAWA <yu...@gmail.com>
Closes #8665 from yu-iskw/SPARK-10274.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c74d38fd
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c74d38fd
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c74d38fd
Branch: refs/heads/master
Commit: c74d38fd8faf8cba981cf934341d24b9a3167025
Parents: 4a0b56e
Author: Yu ISHIKAWA <yu...@gmail.com>
Authored: Thu Sep 17 08:50:46 2015 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Thu Sep 17 08:50:46 2015 -0700
----------------------------------------------------------------------
python/pyspark/mllib/fpm.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/c74d38fd/python/pyspark/mllib/fpm.py
----------------------------------------------------------------------
diff --git a/python/pyspark/mllib/fpm.py b/python/pyspark/mllib/fpm.py
index bdc4a13..bdabba9 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
"""
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org