Repository: spark Updated Branches: refs/heads/branch-2.2 8896c4ee9 -> 9cbf39f1c
[SPARK-19281][FOLLOWUP][ML] Minor fix for PySpark FPGrowth. ## What changes were proposed in this pull request? Follow-up for #17218, some minor fix for PySpark ```FPGrowth```. ## How was this patch tested? Existing UT. Author: Yanbo Liang <yblia...@gmail.com> Closes #18089 from yanboliang/spark-19281. (cherry picked from commit 913a6bfe4b0eb6b80a03b858ab4b2767194103de) Signed-off-by: Yanbo Liang <yblia...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/9cbf39f1 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/9cbf39f1 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/9cbf39f1 Branch: refs/heads/branch-2.2 Commit: 9cbf39f1c74f16483865cd93d6ffc3c521e878a7 Parents: 8896c4e Author: Yanbo Liang <yblia...@gmail.com> Authored: Thu May 25 20:15:15 2017 +0800 Committer: Yanbo Liang <yblia...@gmail.com> Committed: Thu May 25 20:15:38 2017 +0800 ---------------------------------------------------------------------- python/pyspark/ml/fpm.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/9cbf39f1/python/pyspark/ml/fpm.py ---------------------------------------------------------------------- diff --git a/python/pyspark/ml/fpm.py b/python/pyspark/ml/fpm.py index b30d4ed..6ff7d2c 100644 --- a/python/pyspark/ml/fpm.py +++ b/python/pyspark/ml/fpm.py @@ -23,17 +23,17 @@ from pyspark.ml.param.shared import * __all__ = ["FPGrowth", "FPGrowthModel"] -class HasSupport(Params): +class HasMinSupport(Params): """ - Mixin for param support. + Mixin for param minSupport. """ minSupport = Param( Params._dummy(), "minSupport", - """Minimal support level of the frequent pattern. [0.0, 1.0]. - Any pattern that appears more than (minSupport * size-of-the-dataset) - times will be output""", + "Minimal support level of the frequent pattern. [0.0, 1.0]. " + + "Any pattern that appears more than (minSupport * size-of-the-dataset) " + + "times will be output in the frequent itemsets.", typeConverter=TypeConverters.toFloat) def setMinSupport(self, value): @@ -49,16 +49,17 @@ class HasSupport(Params): return self.getOrDefault(self.minSupport) -class HasConfidence(Params): +class HasMinConfidence(Params): """ - Mixin for param confidence. + Mixin for param minConfidence. """ minConfidence = Param( Params._dummy(), "minConfidence", - """Minimal confidence for generating Association Rule. [0.0, 1.0] - Note that minConfidence has no effect during fitting.""", + "Minimal confidence for generating Association Rule. [0.0, 1.0]. " + + "minConfidence will not affect the mining for frequent itemsets, " + + "but will affect the association rules generation.", typeConverter=TypeConverters.toFloat) def setMinConfidence(self, value): @@ -126,7 +127,7 @@ class FPGrowthModel(JavaModel, JavaMLWritable, JavaMLReadable): class FPGrowth(JavaEstimator, HasItemsCol, HasPredictionCol, - HasSupport, HasConfidence, JavaMLWritable, JavaMLReadable): + HasMinSupport, HasMinConfidence, JavaMLWritable, JavaMLReadable): """ .. note:: Experimental --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org