-
- Downloads
[SPARK-7780][MLLIB] intercept in logisticregressionwith lbfgs should not be regularized
The intercept in Logistic Regression represents a prior on categories which should not be regularized. In MLlib, the regularization is handled through Updater, and the Updater penalizes all the components without excluding the intercept which resulting poor training accuracy with regularization. The new implementation in ML framework handles this properly, and we should call the implementation in ML from MLlib since majority of users are still using MLlib api. Note that both of them are doing feature scalings to improve the convergence, and the only difference is ML version doesn't regularize the intercept. As a result, when lambda is zero, they will converge to the same solution. Previously partially reviewed at https://github.com/apache/spark/pull/6386#issuecomment-168781424 re-opening for dbtsai to review. Author: Holden Karau <holden@us.ibm.com> Author: Holden Karau <holden@pigscanfly.ca> Closes #10788 from holdenk/SPARK-7780-intercept-in-logisticregressionwithLBFGS-should-not-be-regularized.
Showing
- mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala 31 additions, 5 deletions...g/apache/spark/ml/classification/LogisticRegression.scala
- mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala 80 additions, 2 deletions...pache/spark/mllib/classification/LogisticRegression.scala
- mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala 28 additions, 0 deletions...ain/scala/org/apache/spark/mllib/optimization/LBFGS.scala
- mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala 19 additions, 15 deletions...e/spark/mllib/regression/GeneralizedLinearAlgorithm.scala
- mllib/src/test/scala/org/apache/spark/ml/classification/OneVsRestSuite.scala 1 addition, 1 deletion...a/org/apache/spark/ml/classification/OneVsRestSuite.scala
- mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala 20 additions, 5 deletions.../spark/mllib/classification/LogisticRegressionSuite.scala
Loading
Please register or sign in to comment