sbmlsim.fit.objects
¶
Definition of Objects used in FitProblems and optimization.
Module Contents¶
Classes¶
A parameter fitting experiment. |
|
Mapping of reference data to observable data. |
|
Parameter adjusted in a parameter optimization. |
|
Data used in a fit. |
|
Initialized FitData with actual data content. |
Attributes¶
- class sbmlsim.fit.objects.FitExperiment(experiment, mappings=None, weights=None, use_mapping_weights=False, fit_parameters=None)[source]¶
A parameter fitting experiment.
A parameter fitting experiment consists of multiple mapping (reference data to observable). The individual mappings can be weighted differently in the fitting.
- Parameters
experiment (Callable) –
mappings (List[str]) –
weights (Union[float, List[float]]) –
use_mapping_weights (bool) –
fit_parameters (Dict[str, List[FitParameter]]) –
- static reduce(fit_experiments)[source]¶
Collect fit mappings of multiple FitExperiments if these can be combined.
- Parameters
fit_experiments (Iterable[FitExperiment]) –
- Return type
List[FitExperiment]
- class sbmlsim.fit.objects.FitMapping(experiment, reference, observable, weight=None, metadata=None)[source]¶
Mapping of reference data to observable data.
In the optimization the difference between the reference data (ground truth) and the observable (predicted data) is minimized. The weight allows to weight the FitMapping.
- Parameters
- class sbmlsim.fit.objects.FitParameter(pid, start_value=None, lower_bound=- np.Inf, upper_bound=np.Inf, unit=None)[source]¶
Parameter adjusted in a parameter optimization.
The bounds define the box in which the parameter can be varied. The start value is the initial value in the parameter fitting for algorithms which use it.
- Parameters
pid (str) –
start_value (float) –
lower_bound (float) –
upper_bound (float) –
unit (str) –
- __eq__(self, other)[source]¶
Check for equality.
Uses math.isclose for all comparisons of numerical values.
- Parameters
other (object) –
- Return type
bool
- to_json(self, path=None)[source]¶
Serialize to JSON.
Serializes to file if path is provided, otherwise returns JSON string.
- Parameters
path (pathlib.Path) –
- Return type
Optional[str]
- class sbmlsim.fit.objects.FitData(experiment, xid, yid, xid_sd=None, xid_se=None, yid_sd=None, yid_se=None, count=None, dataset=None, task=None, function=None)[source]¶
Data used in a fit.
This is either data from a dataset, a simulation results from a task or functional data, i.e. calculated from other data.
- Parameters
experiment (Any) –
xid (str) –
yid (str) –
xid_sd (Optional[str]) –
xid_se (Optional[str]) –
yid_sd (Optional[str]) –
yid_se (Optional[str]) –
count (Optional[Union[int, str]]) –
dataset (Optional[str]) –
task (Optional[str]) –
function (Optional[str]) –