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 2016/05/07 00:10:12 UTC

[jira] [Assigned] (SPARK-15096) LogisticRegression MultiClassSummarizer numClasses can fail if no valid labels are found

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

Apache Spark reassigned SPARK-15096:
------------------------------------

    Assignee: Apache Spark

> LogisticRegression MultiClassSummarizer numClasses can fail if no valid labels are found
> ----------------------------------------------------------------------------------------
>
>                 Key: SPARK-15096
>                 URL: https://issues.apache.org/jira/browse/SPARK-15096
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>    Affects Versions: 2.0.0
>            Reporter: Joseph K. Bradley
>            Assignee: Apache Spark
>            Priority: Minor
>
> LogisticRegression.train calls labelSummarizer.histogram before it calls labelSummarizer.countInvalid: [https://github.com/apache/spark/blob/f5623b460224ce363316c63f5d28947215078fc5/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L292]  But if there are no valid labels, it is possible to get an Exception from empty.max when numClasses is called here: [https://github.com/apache/spark/blob/f5623b460224ce363316c63f5d28947215078fc5/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L751]
> Proposed fix: We should fix numClasses to throw a better exception: [https://github.com/apache/spark/blob/f5623b460224ce363316c63f5d28947215078fc5/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L747]



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