Nosferican / Econometrics.jl

Econometrics in Julia
https://nosferican.github.io/Econometrics.jl/dev
ISC License
69 stars 19 forks source link

Feature request: customize value of tolerance #36

Open DilumAluthge opened 4 years ago

DilumAluthge commented 4 years ago

Right now, the tolerance is hard-coded as 1e-9, in the following two places: https://github.com/Nosferican/Econometrics.jl/blob/b7e20d8fdfc928d38ebcbb8e2953935ecbb5ce88/src/solvers.jl#L195

https://github.com/Nosferican/Econometrics.jl/blob/b7e20d8fdfc928d38ebcbb8e2953935ecbb5ce88/src/solvers.jl#L217

I have a situation where things fail to converge if the tolerance is 1e-9, but converge if I relax the tolerance to 1e-7.

It would be if I could customize the value of the tolerance with a keyword argument, perhaps named tol or tolerance.

For reference, GLM.jl has keyword arguments atol and rtol that allow the user to customize the tolerance.

cc: @Nosferican

Nosferican commented 4 years ago

Thanks for bringing that up to my attention. I agree. I will fix the v1.4 printing update to the tests and tag a release with the compat changes. I will then make another release to expand the kwargs to fit to incorporate rtol, atol, start, and maxiter à la GLM. Thanks for nudging me to give the package some love after an hiatus.

DilumAluthge commented 4 years ago

Bump.

matthewwiese commented 3 years ago

Hey, I've created a pull request (#77) that, although not a complete solution, should get us going in the right direction.

I've wanted to learn Julia through practice for quite a while, so hopefully I can help @Nosferican out with this issue.

Gkreindler commented 1 year ago

I just ran into the same problem, any possible updates on this pull request?

Nosferican commented 1 year ago

I can probably take a look at it this week.