-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better return type for mode estimation #2232
Comments
Out of curiosity, besides the type of the parameter vector (#2363), what other features or changes would you want for the new and improved return type? |
One thing I was dissatisfied with was the awkward nesting of data about the optimisation, and some commonly needed things being hard to access. For instance, the value of the objective function is stored three times: in I'm not sure what the best thing to do is for intuitive usability, while keeping all the data reported by Optimization.jl and the backend optimiser accessible to users who know what they are doing. Maybe just storing the thing returned by Optimization.jl and writing getter functions to get the often-needed bits from it? Also, we should store a flag for whether this was MLE or MAP, and maybe also the model object. The current return type is a left-over from the time when the only optimiser we supported was Optim.jl, and life was simpler. |
Thanks, that makes sense. As an end-user, my main complaint about usability is the one in #2363, and the current structure seems basically fine to me. A MAP/MLE flag would be good. The model object is already stored in Thinking about it as an end-user, the main things I want to be able to get easily from a mode estimate, whether as fields or from getter functions:
|
One more wish to add to the list: it would be great if there was a way to get |
This will be trivial if we take the |
The Optim.jl interface returns a
ModeResult
, a type we define for holding the outcome of the optimisation. For compatibility the Optimisation.jl interface currently returns the same type, but it's not quite a natural fit for it. We might consider changing the return type before making the switch of interfaces official and possibly deprecating the Optim.jl one. Might also consider aligning with similar types from SciML.This came up in review of #2221 with @torfjelde, https://github.com/TuringLang/Turing.jl/pull/2221/files#r1608363430.
The text was updated successfully, but these errors were encountered: