Repository: spark Updated Branches: refs/heads/branch-1.5 77eeaad98 -> 15d2736af
[SPARK-10959] [PYSPARK] StreamingLogisticRegressionWithSGD does not t⦠â¦rain with given regParam and StreamingLinearRegressionWithSGD intercept param is not in correct position. regParam was being passed into the StreamingLogisticRegressionWithSGD constructor, but not transferred to the call for model training. The param is added as a named argument to the call. For StreamingLinearRegressionWithSGC the intercept parameter was not in the correct position and was being passed in as the regularization value. Author: Bryan Cutler <[email protected]> Closes #9087 from BryanCutler/StreamingSGD-convergenceTol-bug-10959-branch-1.5. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/15d2736a Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/15d2736a Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/15d2736a Branch: refs/heads/branch-1.5 Commit: 15d2736af7b521a666ffb4e83cd253db08c4ac96 Parents: 77eeaad Author: Bryan Cutler <[email protected]> Authored: Tue Oct 13 15:59:36 2015 -0700 Committer: Xiangrui Meng <[email protected]> Committed: Tue Oct 13 15:59:36 2015 -0700 ---------------------------------------------------------------------- python/pyspark/mllib/classification.py | 3 ++- python/pyspark/mllib/regression.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/15d2736a/python/pyspark/mllib/classification.py ---------------------------------------------------------------------- diff --git a/python/pyspark/mllib/classification.py b/python/pyspark/mllib/classification.py index 8f27c44..e4500a0 100644 --- a/python/pyspark/mllib/classification.py +++ b/python/pyspark/mllib/classification.py @@ -632,7 +632,8 @@ class StreamingLogisticRegressionWithSGD(StreamingLinearAlgorithm): if not rdd.isEmpty(): self._model = LogisticRegressionWithSGD.train( rdd, self.numIterations, self.stepSize, - self.miniBatchFraction, self._model.weights) + self.miniBatchFraction, self._model.weights, + regParam=self.regParam) dstream.foreachRDD(update) http://git-wip-us.apache.org/repos/asf/spark/blob/15d2736a/python/pyspark/mllib/regression.py ---------------------------------------------------------------------- diff --git a/python/pyspark/mllib/regression.py b/python/pyspark/mllib/regression.py index 41946e3..6bbac02 100644 --- a/python/pyspark/mllib/regression.py +++ b/python/pyspark/mllib/regression.py @@ -669,7 +669,7 @@ class StreamingLinearRegressionWithSGD(StreamingLinearAlgorithm): self._model = LinearRegressionWithSGD.train( rdd, self.numIterations, self.stepSize, self.miniBatchFraction, self._model.weights, - self._model.intercept) + intercept=self._model.intercept) dstream.foreachRDD(update) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
