Closed yanboliang closed 7 years ago
@dlwh Do you or other members have plan to solve this issue? We would like to use LBFGS-B
in Spark for huber loss regression which hit this bug. Thanks!
@yanboliang did you try NonlinearMinimizer with projection on bound ? NonlinearMinimizer has ADMM solver as well that supports bound but in my experiments NonlinearMinimizer with project on bound converges faster...Use NonlinearMinimizer.project and pass the proximal for the bound...
import breeze.optimize.proximal.ProjectBox val lb = DenseVector.zeros[Double] val ub = DenseVector.ones[Double] val solver = NonlinearMinimizer.project(ProjectBox(lb, ub))
After that it works like FirstOrderMinimizer...solver.minimizeAndReturnState(huberLoss, init)
I will look into the LBFGS-B error...
If we choose the initial value which is far from the correct result,
LBFGS-B
will return wrong result and output error logs. You can refer the following code to reproduce this bug. This function has minimumf(x)=2.0
whenx=1.0
. But if we choose the initial value far from 1.0, it will output wrong result.The output is: