aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuo Xiang <sxiang@pinterest.com>2015-08-28 13:09:13 -0700
committerDB Tsai <dbt@netflix.com>2015-08-28 13:09:24 -0700
commit9c58f6441e353fcb4402e1f36d826937d4801298 (patch)
tree41512b489796ab51e3a5f3a862d5a2ac1200ffc8
parentccda27a9beb97b11c2522a0700165fd849af44b1 (diff)
downloadspark-9c58f6441e353fcb4402e1f36d826937d4801298.tar.gz
spark-9c58f6441e353fcb4402e1f36d826937d4801298.tar.bz2
spark-9c58f6441e353fcb4402e1f36d826937d4801298.zip
[SPARK-10336][example] fix not being able to set intercept in LR example
`fitIntercept` is a command line option but not set in the main program. dbtsai Author: Shuo Xiang <sxiang@pinterest.com> Closes #8510 from coderxiang/intercept and squashes the following commits: 57c9b7d [Shuo Xiang] fix not being able to set intercept in LR example (cherry picked from commit 45723214e694b9a440723e9504c562e6393709f3) Signed-off-by: DB Tsai <dbt@netflix.com>
-rw-r--r--examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala b/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala
index 7682557127..8e3760ddb5 100644
--- a/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala
+++ b/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala
@@ -136,6 +136,7 @@ object LogisticRegressionExample {
.setElasticNetParam(params.elasticNetParam)
.setMaxIter(params.maxIter)
.setTol(params.tol)
+ .setFitIntercept(params.fitIntercept)
stages += lor
val pipeline = new Pipeline().setStages(stages.toArray)