Repository: spark
Updated Branches:
  refs/heads/branch-1.3 f47610890 -> 4ffaf8568


[SPARK-6080] [PySpark] correct LogisticRegressionWithLBFGS regType parameter 
for pyspark

Currently LogisticRegressionWithLBFGS in python/pyspark/mllib/classification.py 
will invoke callMLlibFunc with a wrong "regType" parameter.
It was assigned to "str(regType)" which translate None(Python) to 
"None"(Java/Scala). The right way should be translate None(Python) to 
null(Java/Scala) just as what we did at LogisticRegressionWithSGD.

Author: Yanbo Liang <[email protected]>

Closes #4831 from yanboliang/pyspark_classification and squashes the following 
commits:

12db65a [Yanbo Liang] correct LogisticRegressionWithLBFGS regType parameter for 
pyspark

(cherry picked from commit af2effdd7b54316af0c02e781911acfb148b962b)
Signed-off-by: Xiangrui Meng <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4ffaf856
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4ffaf856
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4ffaf856

Branch: refs/heads/branch-1.3
Commit: 4ffaf856882fb1f4a5bfc24e5a05c74ba950e282
Parents: f476108
Author: Yanbo Liang <[email protected]>
Authored: Mon Mar 2 10:17:24 2015 -0800
Committer: Xiangrui Meng <[email protected]>
Committed: Mon Mar 2 10:17:32 2015 -0800

----------------------------------------------------------------------
 python/pyspark/mllib/classification.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4ffaf856/python/pyspark/mllib/classification.py
----------------------------------------------------------------------
diff --git a/python/pyspark/mllib/classification.py 
b/python/pyspark/mllib/classification.py
index 00e2e76..e476517 100644
--- a/python/pyspark/mllib/classification.py
+++ b/python/pyspark/mllib/classification.py
@@ -207,7 +207,7 @@ class LogisticRegressionWithLBFGS(object):
         """
         def train(rdd, i):
             return callMLlibFunc("trainLogisticRegressionModelWithLBFGS", rdd, 
int(iterations), i,
-                                 float(regParam), str(regType), 
bool(intercept), int(corrections),
+                                 float(regParam), regType, bool(intercept), 
int(corrections),
                                  float(tolerance))
 
         return _regression_train_wrapper(train, LogisticRegressionModel, data, 
initialWeights)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to