yanboliang / spark-vlbfgs

Vector-free L-BFGS implementation for Spark MLlib
Apache License 2.0
46 stars 17 forks source link

fix vector free LBFGS numeric stability for Si Yi computing in LBFGS #18

Closed WeichenXu123 closed 7 years ago

WeichenXu123 commented 7 years ago

Previously, when computing LBFGS descent direction, only cache last m+1 coeffs and grad vectors. Do not directly computing Si , Yi vectors. This may cause numeric problem. Update the code to compute Si, Yi first and cache them as history. For bug check, preserve old implementation for now. New implementation as VectorFreeLBFGS.History2, the old one as VectorFreeLBFGS.History1 and add a parameter useNewHistoryClass, default is true.