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

LogisticRegression._checkThresholdConsistency should use values not Params

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.0.3, 2.1.2, 2.2.0
    • Component/s: ML, PySpark
    • Labels:
      None

      Description

      _checkThresholdConsistency incorrectly uses getParam in attempt to access threshold and thresholds values. Furthermore it calls it with Param instead of str:

      >>> from pyspark.ml.classification import LogisticRegression
      >>> lr = LogisticRegression(threshold=0.25, thresholds=[0.75, 0.25])
      Traceback (most recent call last):
      ...
      TypeError: getattr(): attribute name must be string
      

      Finally exception message uses join without converting values to str.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zero323 Maciej Szymkiewicz
                Reporter:
                zero323 Maciej Szymkiewicz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: