aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala b/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
index d2d4e249b4..3e8040d3e9 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
@@ -366,9 +366,10 @@ class LogisticRegression @Since("1.2.0") (
Vectors.zeros(if ($(fitIntercept)) numFeatures + 1 else numFeatures)
if (optInitialModel.isDefined && optInitialModel.get.coefficients.size != numFeatures) {
- val vec = optInitialModel.get.coefficients
+ val vecSize = optInitialModel.get.coefficients.size
logWarning(
- s"Initial coefficients provided $vec did not match the expected size $numFeatures")
+ s"Initial coefficients will be ignored!! As its size $vecSize did not match the " +
+ s"expected size $numFeatures")
}
if (optInitialModel.isDefined && optInitialModel.get.coefficients.size == numFeatures) {