Description
The class LBFGS in mllib.optimization currently provides a setConvergenceTol(tolerance: Int) method for setting the convergence tolerance. The tolerance parameter is of type Int. The specified tolerance is then used as parameter in calling LBFGS.runLBFGS, where the parameter convergenceTol is of type Double.
The Int parameter may cause problem when one creates an optimizer and sets a Double-valued tolerance. e.g:
override val optimizer = new LBFGS(gradient, updater) .setNumCorrections(9) .setConvergenceTol(1e-4) // *type mismatch here* .setMaxNumIterations(100) .setRegParam(1.0)
IMHO there is no need to make the tolerance of type Int. Let's change it into a Double parameter and eliminate the type mismatch problem.