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

LogisticRegression._checkThresholdConsistency should use values not Params

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.0.3, 2.1.2, 2.2.0
    • ML, PySpark
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: