Skip to content

Commit e97e691

Browse files
committed
[SPARK-10959] [PYSPARK] StreamingLogisticRegressionWithSGD does not train with given regParam and StreamingLinearRegressionWithSGD intercept param is not in correct position
1 parent 2217f4f commit e97e691

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

python/pyspark/mllib/classification.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,8 @@ def update(rdd):
632632
if not rdd.isEmpty():
633633
self._model = LogisticRegressionWithSGD.train(
634634
rdd, self.numIterations, self.stepSize,
635-
self.miniBatchFraction, self._model.weights)
635+
self.miniBatchFraction, self._model.weights,
636+
regParam=self.regParam )
636637

637638
dstream.foreachRDD(update)
638639

python/pyspark/mllib/regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def update(rdd):
669669
self._model = LinearRegressionWithSGD.train(
670670
rdd, self.numIterations, self.stepSize,
671671
self.miniBatchFraction, self._model.weights,
672-
self._model.intercept)
672+
intercept=self._model.intercept)
673673

674674
dstream.foreachRDD(update)
675675

0 commit comments

Comments
 (0)