Commit 32efbf3d authored by fzyang's avatar fzyang
Browse files

add param threshold in IForestModel for pyspark-iforest

parent 66b62427
......@@ -138,6 +138,21 @@ class IForestModel(JavaModel, JavaMLWritable, CustomizedJavaMLReadable):
raise RuntimeError("No training summary available for this %s" %
self.__class__.__name__)
@property
@since("2.4.0")
def setThreshold(self, value):
"""
Set the anomaly score threshold for prediction, 0 < value < 1 .
"""
self._call_java("setThreshold", value)
@property
@since("2.4.0")
def getThreshold(self):
"""
Get the anomaly score threshold for prediction, 0 < value < 1 .
"""
return self._call_java("getThreshold")
@inherit_doc
class IForest(JavaEstimator, HasFeaturesCol, HasPredictionCol, HasSeed, JavaMLWritable, CustomizedJavaMLReadable):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment