sierra.core.models.interface#
Interface classes for the mathematical models framework in SIERRA.
Models can be run during stage 3 and added to any configured graph during stage 4.
Classes#
Interface for one-dimensional models. |
|
Interface for one-dimensional models. |
Module Contents#
- class sierra.core.models.interface.IInterExpModel1D(params: sierra.core.types.YAMLDict)[source]#
Interface for one-dimensional models.
1D models are those that generate a single time series from any number of experimental outputs across all experiments in a batch (or from another source). Models will be rendered as lines on a
summary_line(). Models "target" one or more Collated Output Data files which are already configured to be generated, and will show up as additional lines on the generated graph.- abstract run(criteria: sierra.core.variables.batch_criteria.XVarBatchCriteria, cmdopts: sierra.core.types.Cmdopts, pathset: sierra.core.batchroot.PathSet) list[polars.DataFrame][source]#
Run the model and generate list of dataframes.
Each returned dataframe must have:
The index named
Experiment IDIndices which correspond to
criteria.gen_exp_names()
Each dataframe can (potentially) target a different graph.
- abstract should_run(criteria: sierra.core.variables.batch_criteria.XVarBatchCriteria, cmdopts: sierra.core.types.Cmdopts) bool[source]#
Determine if the model should be run for the specified batch criteria.
Some models may only be valid/make sense to run for some batch criteria, so models can be selectively executed with this function.
- class sierra.core.models.interface.IIntraExpModel1D(params: sierra.core.types.YAMLDict)[source]#
Interface for one-dimensional models.
1D models are those that generate a single time series from zero or more experimental outputs within a single Experiment. Models will be rendered as lines on a
stacked_line(). Models "target" one or more graphs which are already configured to be generated, and will show up as additional lines on the generated graph.The dataframes generated by models implement this interface MUST have indices of the same length as those in the graphs they target.
- abstract run(criteria: sierra.core.variables.batch_criteria.XVarBatchCriteria, exp_num: int, cmdopts: sierra.core.types.Cmdopts, pathset: sierra.core.exproot.PathSet) list[polars.DataFrame][source]#
Run the model and generate a list of dataframes.
Each dataframe can (potentially) target different graphs. All dataframes should contain a single column named
model, with each row of the dataframe containing the model prediction at the Experimental Run interval corresponding to the row (e.g., row 7 contains the model prediction for interval 7).
- abstract should_run(criteria: sierra.core.variables.batch_criteria.XVarBatchCriteria, cmdopts: sierra.core.types.Cmdopts, exp_num: int) bool[source]#
Determine if the model should be run for the specified experiment.
Some models may only be valid/make sense to run for a subset of experiments within a batch, so models can be selectively executed with this function.