Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8389280
Mark a number of alogrithms and models experimental that are marked t…
holdenk May 5, 2016
1fa57e5
Add the rest
holdenk May 5, 2016
b1ce817
Use mathjax for formula in PyDoc
holdenk May 5, 2016
8125c8c
Switch to math highlighting and update legostic regresion get doc sin…
holdenk May 5, 2016
c72fa46
Long line fix
holdenk May 5, 2016
3fd1dce
Start adding the missing params to mutli-layer perceptron, also inves…
holdenk May 5, 2016
c7caa43
Or wait we just don't need to support None
holdenk May 5, 2016
4776221
Update the doc string for weights param and add doctest that verifys …
holdenk May 6, 2016
64942b7
Merge in master
holdenk May 9, 2016
2397004
mini fix
holdenk May 10, 2016
130d05f
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk May 10, 2016
a73913b
more pydoc fix
holdenk May 10, 2016
50b41ae
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk May 10, 2016
9e38ddf
Remove flaky doctet component
holdenk May 10, 2016
f4df8f0
Add a : as requested
holdenk May 10, 2016
5df5a93
Merge in master
holdenk May 19, 2016
2eec947
Back out some unrelated changes that are in a seperate PR anyways
holdenk May 19, 2016
e11dbf8
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk May 23, 2016
4111b2d
Update scaladoc and PyDoc to both have the correct chain for getThres…
holdenk May 26, 2016
53ab790
pep8
holdenk May 26, 2016
c2c7900
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk Jun 6, 2016
a7aadec
Revert doc change
holdenk Jun 6, 2016
e4061f4
minor fix
holdenk Jun 6, 2016
7b634b6
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk Jun 7, 2016
873f6c8
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk Jun 11, 2016
9fb2e41
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk Jun 12, 2016
74636b1
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk Jun 13, 2016
d925f38
Merge branch 'master' into SPARK-15162-SPARK-15164-update-some-pydocs
holdenk Jun 14, 2016
3981612
oook lets try 86ing mathjax but... welll w/e
holdenk Jun 14, 2016
3d13c6c
reenable mathjax
holdenk Jun 14, 2016
2be8cdf
Revert "[SPARK-15745][SQL] Use classloader's getResource() for readin…
holdenk Jun 14, 2016
4431daa
Support both methods
holdenk Jun 14, 2016
d842309
Revert "Support both methods"
holdenk Jun 21, 2016
de63f9f
Revert "Revert "[SPARK-15745][SQL] Use classloader's getResource() fo…
holdenk Jun 21, 2016
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
Update scaladoc and PyDoc to both have the correct chain for getThres…
…hold (thresholds -> threshold -> threshold default value)
  • Loading branch information
holdenk committed May 26, 2016
commit 4111b2d01c33fac3c2537fe9430ce05063530a48
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ private[classification] trait LogisticRegressionParams extends ProbabilisticClas
/**
* Get threshold for binary classification.
*
* If [[threshold]] is set, returns that value.
* Otherwise, if [[thresholds]] is set with length 2 (i.e., binary classification),
* If [[thresholds]] is set with length 2 (i.e., binary classification),
* this returns the equivalent threshold: {{{1 / (1 + thresholds(0) / thresholds(1))}}}.
* Otherwise, returns [[threshold]] default value.
* Otherwise, returns [[threshold]] if set, or its default value if unset.
*
* @group getParam
* @throws IllegalArgumentException if [[thresholds]] is set to an array of length other than 2.
Expand Down
11 changes: 6 additions & 5 deletions python/pyspark/ml/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class LogisticRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredicti
threshold = Param(Params._dummy(), "threshold",
"Threshold in binary classification prediction, in range [0, 1]." +
" If threshold and thresholds are both set, they must match." +
"e.g. threshold must be equal to [1-p, p].",
"e.g. if threshold is p, then thresholds must be equal to [1-p, p].",
typeConverter=TypeConverters.toFloat)

@keyword_only
Expand Down Expand Up @@ -157,10 +157,11 @@ 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:
:math:`\\frac{1}{1 + \\frac{thresholds(0)}{thresholds(1)}}`.
Get threshold for binary classification.

If :py:attr:`thresholds is set with length 2 (i.e., binary classification),
Copy link
Contributor

@MLnick MLnick Jun 1, 2016

Choose a reason for hiding this comment

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

missing ` here

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

"... default value if unset."

"""
self._checkThresholdConsistency()
if self.isSet(self.thresholds):
Expand Down