Repository: spark
Updated Branches:
  refs/heads/master 699906e53 -> 4f572008f


[SPARK-7793] [MLLIB] Use getOrElse for getting the threshold of SVM model

same issue and fix as in Spark-7694.

Author: Shuo Xiang <[email protected]>

Closes #6321 from coderxiang/nb and squashes the following commits:

a5e6de4 [Shuo Xiang] use getOrElse for svmmodel.tostring
2cb0177 [Shuo Xiang] Merge remote-tracking branch 'upstream/master' into nb
5f109b4 [Shuo Xiang] Merge remote-tracking branch 'upstream/master'
c5c5bfe [Shuo Xiang] Merge remote-tracking branch 'upstream/master'
98804c9 [Shuo Xiang] fix bug in topBykey and update test


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4f572008
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4f572008
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4f572008

Branch: refs/heads/master
Commit: 4f572008f804068c1a81cc334ff2367dbeae6493
Parents: 699906e
Author: Shuo Xiang <[email protected]>
Authored: Thu May 21 12:09:44 2015 -0700
Committer: Xiangrui Meng <[email protected]>
Committed: Thu May 21 12:09:44 2015 -0700

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/mllib/classification/SVM.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4f572008/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala
----------------------------------------------------------------------
diff --git 
a/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala 
b/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala
index 33104cf..3484855 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala
@@ -89,7 +89,7 @@ class SVMModel (
   override protected def formatVersion: String = "1.0"
 
   override def toString: String = {
-    s"${super.toString}, numClasses = 2, threshold = ${threshold.get}"
+    s"${super.toString}, numClasses = 2, threshold = 
${threshold.getOrElse("None")}"
   }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to