aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark
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:32 -0800
commit4ffaf856882fb1f4a5bfc24e5a05c74ba950e282 (patch)
treef95ebe0ad9198849dc6f85e61531351754355d3e /python/pyspark
parentf476108901c42ea61873f02dc2fee15896550d30 (diff)
downloadspark-4ffaf856882fb1f4a5bfc24e5a05c74ba950e282.tar.gz
spark-4ffaf856882fb1f4a5bfc24e5a05c74ba950e282.tar.bz2
spark-4ffaf856882fb1f4a5bfc24e5a05c74ba950e282.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 (cherry picked from commit af2effdd7b54316af0c02e781911acfb148b962b) Signed-off-by: Xiangrui Meng <meng@databricks.com>
Diffstat (limited to 'python/pyspark')
-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)