Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Drop range tests and clean docstrings
  • Loading branch information
zero323 committed Mar 26, 2017
commit bdea0ff5e126c34264e6a417cf4e7b3b0e470d10
16 changes: 6 additions & 10 deletions python/pyspark/ml/fpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,21 @@

class HasSupport(Params):
"""
Mixin for param support: [0.0, 1.0].
Mixin for param support.
"""

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""",
typeConverter=TypeConverters.toFloat)

def setMinSupport(self, value):
"""
Sets the value of :py:attr:`minSupport`.
"""
if not (0 <= value <= 1):
raise ValueError("Support must be in range [0, 1]")
return self._set(minSupport=value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removed too much! This line should remain


def getMinSupport(self):
"""
Expand All @@ -52,22 +50,20 @@ def getMinSupport(self):

class HasConfidence(Params):
"""
Mixin for param confidence: [0.0, 1.0].
Mixin for param confidence.
"""

minConfidence = Param(
Params._dummy(),
"minConfidence",
""""Minimal confidence for generating Association Rule. [0.0, 1.0]
"""Minimal confidence for generating Association Rule. [0.0, 1.0]
Note that minConfidence has no effect during fitting.""",
typeConverter=TypeConverters.toFloat)

def setMinConfidence(self, value):
"""
Sets the value of :py:attr:`minConfidence`.
"""
if not (0 <= value <= 1):
raise ValueError("Confidence must be in range [0, 1]")
return self._set(minConfidence=value)

def getMinConfidence(self):
Expand Down