We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e068e3 commit 3364295Copy full SHA for 3364295
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
@@ -132,10 +132,10 @@ class LogisticRegressionModel private[ml] (
132
override def transform(dataset: DataFrame, paramMap: ParamMap): DataFrame = {
133
transformSchema(dataset.schema, paramMap, logging = true)
134
val map = this.paramMap ++ paramMap
135
- val scoreFunction = udf((v: Vector) => {
+ val scoreFunction = udf { v: Vector => {
136
val margin = BLAS.dot(v, weights)
137
1.0 / (1.0 + math.exp(-margin))
138
- } : Double)
+ }
139
val t = map(threshold)
140
val predictFunction = udf { score: Double =>
141
if (score > t) 1.0 else 0.0
0 commit comments