Register and Restore Model Parameters
parameter_plan.RdPrepare model-independent parameter coordinates and component reconstruction.
Arguments
- components
Named list of numeric matrices/scalars, functions or NULL.
- prefixes
Matrix name prefixes, a character vector matching components.
- named
Names of explicit named parameter-vector components. Their names are retained; equal starting values do not imply sharing.
- reduced
Share equal starting values within each matrix?
Value
A locked environment with start, the full starting vector, and
restore(param), returning a named list of matrices, functions and vectors.
Details
Components are visited in list order. Matrix naming and sharing match
hfit. Function parameters come from their named numeric
param defaults, evaluated in the original environment; function bodies
are not called. Names shared across components identify one parameter.
Conflicting starts warn and use the first value. Functions retain their
environments and binding semantics. No model, optimizer, initialization policy
or random generator is supplied by this API. External function environments
remain references; evaluating user parameter defaults can have side effects.
Restore accepts the full vector in starting order, or exactly its names in any order. Nonfinite proposals are retained for the objective to handle. Fixed/free selectors and constraints use this full coordinate order and are handled by the optimizer layer. Create a new plan when definitions change.