Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-8335

DecisionTreeModel.predict() return type not convenient!

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: MLlib

      Description

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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sfxardas Sebastian Walz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified