[
https://issues.apache.org/jira/browse/SPARK-6080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341426#comment-14341426
]
Yanbo Liang edited comment on SPARK-6080 at 2/28/15 9:15 AM:
-------------------------------------------------------------
This bug is easy to reproduce. In a PySpark environment, when you call
model = LogisticRegressionWithSGD.train(data, regType=None)
it will return a LogisticRegressionModel which was trained with no
regularization.
But when you run
model = LogisticRegressionWithLBFGS.train(data, regType=None)
it will throw an exception
java.lang.IllegalArgumentException: Invalid value for 'regType' parameter.
Can only be initialized using the following string values: ['l1', 'l2', None].
This is due to when invoke callMLlibFunc of LogisticRegressionWithLBFGS at
python/pyspark/mllib/classification.py, the parameter 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).
We need to do the same thing as LogisticRegressionWithSGD.
was (Author: yanboliang):
This bug is easy to reproduce. In a PySpark environment, when you call
model = LogisticRegressionWithSGD.train(data, regType=None)
it will return a LogisticRegressionModel which was trained with no
regularization.
But when you run
model = LogisticRegressionWithLBFGS.train(data, regType=None)
it will throw an exception
java.lang.IllegalArgumentException: Invalid value for 'regType' parameter.
Can only be initialized using the following string values: ['l1', 'l2', None].
This is due to when invoke callMLlibFunc at
python/pyspark/mllib/classification.py, the parameter 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).
We need to do the same thing as LogisticRegressionWithSGD.
> LogisticRegressionWithLBFGS in PySpark was assigned wrong "regType" parameter
> -----------------------------------------------------------------------------
>
> Key: SPARK-6080
> URL: https://issues.apache.org/jira/browse/SPARK-6080
> Project: Spark
> Issue Type: Bug
> Components: MLlib, PySpark
> Reporter: Yanbo Liang
>
> Currently LogisticRegressionWithLBFGS in
> python/pyspark/mllib/classification.py will invoke callMLlibFunc with a wrong
> "regType" parameter.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]