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

Joseph K. Bradley commented on SPARK-8799:
------------------------------------------

The missing functionality was added in [SPARK-9312], but we cannot fix this 
JIRA until 3.0.0 since it will require breaking APIs (changing OneVsRest's 
inheritance structure and supported FeatureTypes).  Let's target this fix for 
3.0.0, for which I'll recommend:
* Rename current OneVsRest to GenericOneVsRest or something like that.  Have it 
inherit from Classifier and take a type parameter for FeaturesType.
* Add a specialization of GenericOneVsRest with fixed FeaturesType = VectorUDT, 
and call this new one OneVsRest.
I _think_ that will avoid breaking most user code (but I have not thought it 
through carefully).

> OneVsRestModel should extend ClassificationModel
> ------------------------------------------------
>
>                 Key: SPARK-8799
>                 URL: https://issues.apache.org/jira/browse/SPARK-8799
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: Feynman Liang
>            Priority: Minor
>
> Many parts of `OneVsRestModel` can be generalized to `ClassificationModel`. 
> For example:
>  * `accColName` can be used to populate `ClassificationModel#predictRaw` and 
> share implementations of `transform`
>  * SPARK-8092 adds `setFeaturesCol` and `setPredictionCol` which could be 
> gotten for free through subclassing
> `ClassificationModel` is the correct supertype (e.g. not `PredictionModel`) 
> because the labels for a `OneVsRest` will always be discrete and finite.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to