Github user yanboliang commented on a diff in the pull request: https://github.com/apache/spark/pull/4831#discussion_r25582380 --- Diff: python/pyspark/mllib/classification.py --- @@ -207,7 +207,7 @@ def train(cls, data, iterations=100, initialWeights=None, regParam=0.01, regType """ 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), --- End diff -- I think directly use regType id enough, because py4j can translate "l1","l2",None in Python to "l1","l2",null in Java/Scala. And I found the peer functions LogisticRegressionWithSGD and SVMWithSGD also directly use regType and it can work well.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org