Skip to content

Commit 64914a3

Browse files
committed
added getThreshold to SVMModel
1 parent b1fc5ec commit 64914a3

File tree

1 file changed

+7
-0
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/classification

1 file changed

+7
-0
lines changed

mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ class SVMModel (
4949
this
5050
}
5151

52+
/**
53+
* :: Experimental ::
54+
* Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.
55+
*/
56+
@Experimental
57+
def getThreshold: Option[Double] = threshold
58+
5259
/**
5360
* :: Experimental ::
5461
* Clears the threshold so that `predict` will output raw prediction scores.

0 commit comments

Comments
 (0)