You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2015/06/18 09:40:00 UTC

[jira] [Resolved] (SPARK-8335) DecisionTreeModel.predict() return type not convenient!

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

Sean Owen resolved SPARK-8335.
------------------------------
    Resolution: Won't Fix

Heh, then what does Experimental mean? if it can't be changed then we have people adding APIs thinking "it's OK if it's not finished since I can change it" when they can't. Maybe a lot of this stuff should be un-marked Experimental if it's not going to updated going forward anyway.

But yeah people consuming this from Java are probably already working around this with casts, and this change would break that. And I suppose you're saying you actually prefer people to migrate anyway.

> DecisionTreeModel.predict() return type not convenient!
> -------------------------------------------------------
>
>                 Key: SPARK-8335
>                 URL: https://issues.apache.org/jira/browse/SPARK-8335
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>    Affects Versions: 1.3.1
>            Reporter: Sebastian Walz
>            Priority: Minor
>              Labels: easyfix, machine_learning
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> org.apache.spark.mllib.tree.model.DecisionTreeModel has a predict method:
> def predict(features: JavaRDD[Vector]): JavaRDD[Double]
> The problem here is the generic type of the return type JAVARDD[Double] because its a scala Double and I would expect a java.lang.Double. (to be convenient e.g. with org.apache.spark.mllib.classification.ClassificationModel)
> I wanted to extend the DecisionTreeModel and use it only for Binary Classification and wanted to implement the trait org.apache.spark.mllib.classification.ClassificationModel . But its not possible because the ClassificationModel already defines the predict method but with an return type JAVARDD[java.lang.Double]. 



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