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

Use getOrElse for getting the threshold of LR model

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: MLlib
    • Labels:
      None
    • Target Version/s:

      Description

      The toString method of LogisticRegressionModel calls get method on an Option (threshold) without a safeguard. In spark-shell, the following code

      lbfgs.scala
      val model = algorithm.run(data).clearThreshold()
      

      in lbfgs code will fail as toString method will be called right after clearThreshold() to show the results in the REPL.

        Attachments

          Activity

            People

            • Assignee:
              coderxiang Shuo Xiang
              Reporter:
              coderxiang Shuo Xiang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: