[ 
https://issues.apache.org/jira/browse/SPARK-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14662303#comment-14662303
 ] 

Feynman Liang edited comment on SPARK-9660 at 8/7/15 7:23 PM:
--------------------------------------------------------------

Logistic regression [only supports binary 
classification|https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L83],
 but various 
[scaladocs|https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L50]
 assert that this is a "backwards compatibility" feature, suggesting that 
multiclass is supported.

This is made more confusing by the fact that inheriting from 
{{ProbabilisticClassifier}} exposes a {{setThresholds(Array[Double])}} public 
method, potentially allowing a user to set more than two thresholds on a binary 
classifier... It may make sense to consider adding {{numClasses}} to 
{{ClassifierParams}} and explicitly check that in {{HasThresholds}} (self type 
annotation?)


was (Author: fliang):
Logistic regression [only supports binary 
classification|https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L83],
 but various 
[scaladocs|https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala#L50]
 assert that this is a "backwards compatibility" feature, suggesting that 
multiclass is supported.

This is made more confusing by the fact that inheriting from 
{{ProbabilisticClassifier}} exposes a {{setThresholds(Array[Double])}} public 
method, potentially allowing a user to set more than two thresholds on a binary 
classifier... It may make sense to consider adding {{numClasses}} to 
{{ClassifierParams}} and explicitly check that when setting thresholds.

> ML 1.5 QA: API: New Scala APIs, docs
> ------------------------------------
>
>                 Key: SPARK-9660
>                 URL: https://issues.apache.org/jira/browse/SPARK-9660
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Documentation, ML, MLlib
>            Reporter: Joseph K. Bradley
>
> Audit new public Scala APIs added to MLlib.  Take note of:
> * Protected/public classes or methods.  If access can be more private, then 
> it should be.
> * Also look for non-sealed traits.
> * Documentation: Missing?  Bad links or formatting?
> *Make sure to check the object doc!*
> As you find issues, please comment here, or better yet create JIRAs and link 
> them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to