Hi folks,

I am implementing a regression model for count data which uses LBFGS for 
parameter estimation. Following the patterns in mllib.regression, I created an 
object PoissonRegressionModelWithLBFGS, which creates a new instance of class 
PoissonRegressionModelWithLBFGS and invokes the run method to get the 
weights/parameters. 

The implementations are straightforward. But I encountered a problem while 
using class LBFGS. The parameter of setConvergenceTol is of type Int rather 
than Double. This leads to the inability to specify a tolerance less than 1.0 
and a type mismatch error when passing a Double value. In fact, the class LBFGS 
internally uses convergenceTol as a Double var. So we can safely change the 
parameter of setConvergenceTol from type Int to type Double. 

I’ve created a pull request for this. Please take a review here: 
https://github.com/apache/spark/pull/1104/files

Best regards,
Gang

Reply via email to