optimization
classes.optimization
What an optimization stage fits, resolved once for every reader.
A stage names the parameters it fits in free_parameters. Each entry fits its parameter at the parameter’s own layout, its declared shape or, with heterogeneous: true, one value per node, and writes shape or heterogeneous only to change that layout; heterogeneous: false or shape: "()" narrows it to one scalar. An entry that writes the layout its parameter already declares is a restatement and is refused, so the layout has one home. :func:fitted_parameters resolves every entry of a stage to the parameter, its owner and the layout it is fitted at; the tvboptim stage marking reads it.
Functions
| Name | Description |
|---|---|
| fitted_parameters | Every parameter stage fits, each as the parsed entry with its layout after inheritance. |
| layout | The layout parameter declares, as shape terms: its shape, else (n_nodes,) when it is heterogeneous, else a scalar. |
| optimization_stages | The stages of optimization; one written without stages is its own single stage. |
fitted_parameters
classes.optimization.fitted_parameters(stage, experiment, couplings=None)Every parameter stage fits, each as the parsed entry with its layout after inheritance.
Each entry is parsed by :func:tvbo.templates.tvboptim.utils.parse_free_param against the experiment’s dynamics and couplings (by default the network’s), then given the layout it is fitted at: the one it writes, or else its parameter’s own. heterogeneous and shape in the result state that layout. A written layout equal to the parameter’s own is refused, naming the stage and the parameter.
layout
classes.optimization.layout(parameter)The layout parameter declares, as shape terms: its shape, else (n_nodes,) when it is heterogeneous, else a scalar.
optimization_stages
classes.optimization.optimization_stages(optimization)The stages of optimization; one written without stages is its own single stage.