Repository: spark
Updated Branches:
  refs/heads/master e7d8ae444 -> af2effdd7


[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


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

Branch: refs/heads/master
Commit: af2effdd7b54316af0c02e781911acfb148b962b
Parents: e7d8ae4
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:24 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/af2effdd/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