-
- Downloads
[SPARK-20047][ML] Constrained Logistic Regression
## What changes were proposed in this pull request? MLlib ```LogisticRegression``` should support bound constrained optimization (only for L2 regularization). Users can add bound constraints to coefficients to make the solver produce solution in the specified range. Under the hood, we call Breeze [```L-BFGS-B```](https://github.com/scalanlp/breeze/blob/master/math/src/main/scala/breeze/optimize/LBFGSB.scala) as the solver for bound constrained optimization. But in the current breeze implementation, there are some bugs in L-BFGS-B, and https://github.com/scalanlp/breeze/pull/633 fixed them. We need to upgrade dependent breeze later, and currently we use the workaround L-BFGS-B in this PR temporary for reviewing. ## How was this patch tested? Unit tests. Author: Yanbo Liang <ybliang8@gmail.com> Closes #17715 from yanboliang/spark-20047.
Showing
- mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala 218 additions, 5 deletions...g/apache/spark/ml/classification/LogisticRegression.scala
- mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala 464 additions, 2 deletions...che/spark/ml/classification/LogisticRegressionSuite.scala
Loading
Please register or sign in to comment