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

Expose probability, rawPrediction in MultilayerPerceptronClassificationModel

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: ML
    • Labels:
      None

      Description

      In org.apache.spark.ml.classification.MultilayerPerceptronClassificationModel, there isn't any way to get raw prediction scores; only an integer output (from 0 to #classes - 1) is available via the `predict` method.

      `mplModel.predict` is called within the class to get the raw score, but `mlpModel` is private so that isn't available to outside callers.

      The raw score is useful when the user wants to interpret the classifier output as a probability.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                WeichenXu123 Weichen Xu
                Reporter:
                robert_dodier Robert Dodier
                Shepherd:
                Joseph K. Bradley
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: