Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/5301#discussion_r27756422
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
---
@@ -55,6 +56,14 @@ class LogisticRegressionSuite extends FunSuite with
MLlibTestSparkContext {
assert(model.getPredictionCol == "prediction")
assert(model.getRawPredictionCol == "rawPrediction")
assert(model.getProbabilityCol == "probability")
+ assert(model.intercept != 0.0)
+ }
+
+ test("logistic regression doesn't fit intercept when fitIntercept is
off") {
+ val lr = new LogisticRegression
+ lr.setFitIntercept(false)
+ val model = lr.fit(dataset)
+ assert(model.intercept == 0.0)
--- End diff --
similar: Please use "===" instead of "=="
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]