You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/01/07 08:58:34 UTC
[jira] [Commented] (SPARK-5127) Fixed overflow when there are
outliers in data in Logistic Regression
[ https://issues.apache.org/jira/browse/SPARK-5127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14267381#comment-14267381 ]
Apache Spark commented on SPARK-5127:
-------------------------------------
User 'dbtsai' has created a pull request for this issue:
https://github.com/apache/spark/pull/3928
> Fixed overflow when there are outliers in data in Logistic Regression
> ---------------------------------------------------------------------
>
> Key: SPARK-5127
> URL: https://issues.apache.org/jira/browse/SPARK-5127
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Reporter: DB Tsai
>
> gradientMultiplier = (1.0 / (1.0 + math.exp(margin))) - label
> However, the first part of gradientMultiplier will be suffered from overflow if there are samples far away from hyperplane, and this happens when there are outliers in data. As a result, we use the equivalent formula but more numerically stable.
> val gradientMultiplier =
> if (margin > 0.0) {
> val temp = math.exp(-margin)
> temp / (1.0 + temp) - label
> } else {
> 1.0 / (1.0 + math.exp(margin)) - label
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org