Skip to content
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

higher-level helpers for parameters #9

Closed
kyleam opened this issue Jun 29, 2023 · 0 comments · Fixed by #18
Closed

higher-level helpers for parameters #9

kyleam opened this issue Jun 29, 2023 · 0 comments · Fixed by #18
Labels
enhancement New feature or request

Comments

@kyleam
Copy link
Collaborator

kyleam commented Jun 29, 2023

[ This is just a stub for something that we've mentioned a lot (most recently in gh-5) but don't have a dedicated issue for. ]

From the README:

At this point, nmrec is focused on parsing records into objects that are very closely tied to the form in the control stream and that don't lose information. In the future (and as needed), the plan is to add more convenience wrappers for working with these objects and helpers for getting things in and out of higher-level forms.

One of the main things this is referring to is the omega, sigma, and theta values. The first step we be really sitting down and mapping out what the design should look like.

@kyleam kyleam added the enhancement New feature or request label Jun 29, 2023
kyleam added a commit that referenced this issue Nov 16, 2023
One of the original motivations for nmrec was to support a feature in
bbr where initial estimates for a new model are inherited from the
final estimates of a previous (typically parent) model.

To make that possible, add set_theta(), set_omega(), and set_sigma()
functions that accept a full parameter value---which is the form that
would come from calling bbr::get_{theta,omega,sigma} on the parent
model---and then map each of those values to the corresponding option
in the parsed records.

Two constraints simplify things from the design standpoint:

 * only support updating parameters that are explicitly written in the
   control stream

   This makes it much easier to stick close to the original form
   because we don't have to drastically alter the control stream, and
   instead are (mostly) working with options that are already there.

   And that also means we don't need complex logic for determining if
   two representations are the same, and deciding what's best to use
   in a given context.

 * only accept the _full_ parameter

   Even though we only update the explicit values, we always require
   the full parameter to be passed, so we don't need provide an
   explicit interface for selecting a sub-part of vector or matrix.

   Note, however, that the caller can still effectively update a
   subset of the explicit values by setting some input values to NA.

Closes #9.
kyleam added a commit that referenced this issue Nov 16, 2023
One of the original motivations for nmrec was to support a feature in
bbr where initial estimates for a new model are inherited from the
final estimates of a previous (typically parent) model.

To make that possible, add set_theta(), set_omega(), and set_sigma()
functions that accept a full parameter value---which is the form that
would come from calling bbr::get_{theta,omega,sigma} on the parent
model---and then map each of those values to the corresponding option
in the parsed records.

Two constraints simplify things from the design standpoint:

 * only support updating parameters that are explicitly written in the
   control stream

   This makes it much easier to stick close to the original form
   because we don't have to drastically alter the control stream and
   instead are (mostly) working with options that are already there.

   And that also means we don't need complex logic for determining if
   two representations are the same, and deciding what's best to use
   in a given context.

 * only accept the _full_ parameter

   Even though we only update the explicit values, we always require
   the full parameter to be passed, so we don't need provide an
   explicit interface for selecting a sub-part of vector or matrix.

   Note, however, that the caller can still effectively update a
   subset of the explicit values by setting some input values to NA.

Closes #9.
@kyleam kyleam closed this as completed in #18 Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant