aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorYanbo Liang <ybliang8@gmail.com>2015-03-02 10:17:24 -0800
committerXiangrui Meng <meng@databricks.com>2015-03-02 10:17:24 -0800
commitaf2effdd7b54316af0c02e781911acfb148b962b (patch)
tree9354534db460c71fa0249d7688da10c93fabc2d4 /python
parente7d8ae444fead27fe85a879f2f7a4cfdd8c47b16 (diff)
downloadspark-af2effdd7b54316af0c02e781911acfb148b962b.tar.gz
spark-af2effdd7b54316af0c02e781911acfb148b962b.tar.bz2
spark-af2effdd7b54316af0c02e781911acfb148b962b.zip
[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 <ybliang8@gmail.com> Closes #4831 from yanboliang/pyspark_classification and squashes the following commits: 12db65a [Yanbo Liang] correct LogisticRegressionWithLBFGS regType parameter for pyspark
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/mllib/classification.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/mllib/classification.py b/python/pyspark/mllib/classification.py
index 00e2e76711..e476517370 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)