[
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: [email protected]
For additional commands, e-mail: [email protected]