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 ad678e9 commit 494b632Copy full SHA for 494b632
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
@@ -128,12 +128,10 @@ class LogisticRegressionModel private[ml] (
128
1.0 / (1.0 + math.exp(-margin))
129
}
130
val t = map(threshold)
131
- val predict: Vector => Double = (v) => {
132
- if (score(v) > t) 1.0 else 0.0
+ val predict: Double => Double = (score) => {
+ if (score > t) 1.0 else 0.0
133
134
- dataset.select(
135
- Star(None),
136
- score.call(map(featuresCol).attr) as map(scoreCol),
137
- predict.call(map(featuresCol).attr) as map(predictionCol))
+ dataset.select(Star(None), score.call(map(featuresCol).attr) as map(scoreCol))
+ .select(Star(None), predict.call(map(scoreCol).attr) as map(predictionCol))
138
139
0 commit comments