You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shuo Xiang (JIRA)" <ji...@apache.org> on 2015/05/18 02:16:00 UTC

[jira] [Updated] (SPARK-7694) Use getOrElse for getting the threshold of LR model

     [ https://issues.apache.org/jira/browse/SPARK-7694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shuo Xiang updated SPARK-7694:
------------------------------
    Description: 
The toString method of LogisticRegressionModel calls get method on an Option (threshold) without a safeguard. In spark-shell, the following code 

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

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

  was:
The toString method of LogisticRegressionModel calls get method on an Option (threshold) without a safeguard. In spark-shell, the following code 
```scala
val model = algorithm.run(data).clearThreshold()
```
 in lbfgs code will fail as toStringmethod will be called right after clearThreshold() to show the results in the REPL.


> Use getOrElse for getting the threshold of LR model 
> ----------------------------------------------------
>
>                 Key: SPARK-7694
>                 URL: https://issues.apache.org/jira/browse/SPARK-7694
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>            Reporter: Shuo Xiang
>            Priority: Minor
>
> The toString method of LogisticRegressionModel calls get method on an Option (threshold) without a safeguard. In spark-shell, the following code 
> val model = algorithm.run(data).clearThreshold()
>  in lbfgs code will fail as toStringmethod will be called right after clearThreshold() to show the results in the REPL.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org