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

LogisticRegressionModel is missing getThreshold()

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: ML, PySpark
    • Labels:

      Description

      Say I just loaded a logistic regression model from storage. How do I check that model's threshold in PySpark? From what I can see, the only way to do that is to dip into the Java object:

      model._java_obj.getThreshold())
      

      It seems like PySpark's version of LogisticRegressionModel should include this method.

      Another issue is that it's not clear whether the threshold is for the raw prediction or the probability. Maybe it's obvious to machine learning practitioners, but I couldn't tell from reading the docs or skimming the code what the threshold was for exactly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nchammas Nicholas Chammas
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: