Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/12938#discussion_r65418382
--- Diff: python/pyspark/ml/classification.py ---
@@ -157,10 +157,12 @@ def setThreshold(self, value):
@since("1.4.0")
def getThreshold(self):
"""
- Gets the value of threshold or attempt to convert thresholds to
threshold if set, or default
- value if neither are set.
- This conversion is equivalent to:
+ Get threshold for binary classification.
+
+ If :py:attr:`thresholds is set with length 2 (i.e., binary
classification),
+ this returns the equivalent threshold:
:math:`\\frac{1}{1 + \\frac{thresholds(0)}{thresholds(1)}}`.
+ Otherwise, returns :py:attr:`threshold` if set or its default
value.
--- End diff --
"... default value if unset."
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]