Skip to content

Commit 30165c4

Browse files
committed
[SPARK-1406] Fixed extreme cases for logit
1 parent 7a5e0ec commit 30165c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/mllib/pmml/export/BinaryClassificationPMMLModelExport.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ private[mllib] class BinaryClassificationPMMLModelExport(
4949
var interceptNO = threshold
5050
if (RegressionNormalizationMethodType.LOGIT == normalizationMethod) {
5151
if (threshold <= 0)
52-
interceptNO = 1000
53-
else if (threshold >= 1)
5452
interceptNO = -1000
53+
else if (threshold >= 1)
54+
interceptNO = 1000
5555
else
5656
interceptNO = -math.log(1/threshold -1)
5757
}

0 commit comments

Comments
 (0)