spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DB Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-12804) ml.classification.LogisticRegression fails when FitIntercept with same-label dataset
Date Tue, 19 Jan 2016 19:09:39 GMT

     [ https://issues.apache.org/jira/browse/SPARK-12804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

DB Tsai resolved SPARK-12804.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

Issue resolved by pull request 10743
[https://github.com/apache/spark/pull/10743]

> ml.classification.LogisticRegression fails when FitIntercept with same-label dataset
> ------------------------------------------------------------------------------------
>
>                 Key: SPARK-12804
>                 URL: https://issues.apache.org/jira/browse/SPARK-12804
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>    Affects Versions: 1.6.0
>            Reporter: Feynman Liang
>            Assignee: Feynman Liang
>             Fix For: 2.0.0
>
>
> When training LogisticRegression on a dataset where the label is all 0 or all 1, an array
out of bounds exception is thrown. The problematic code is
> {code}
>       initialCoefficientsWithIntercept.toArray(numFeatures)
>         = math.log(histogram(1) / histogram(0))
>     }
> {code}
> The correct behaviour is to short-circuit training entirely when only a single label
is present (can be detected from {{labelSummarizer}}) and return a classifier which assigns
all true/false with infinite weights.



--
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


Mime
View raw message