You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/model_based_design.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,49 +16,58 @@ This class contains properties of the static model, those properties derived fro
16
16
Included are the properties:
17
17
18
18
*``model_name``
19
-
*``sbml_str`` is an SBML string for the model
19
+
*``sbml_str`` is an SBML string for the model. Antimony models are converted to SBML using roadrunner.
20
20
* Various static properties, such as ``species_names``, ``num_species``
21
21
22
+
StaticModel uses roadrunner transiently to query the underlying model (e.g., names of floating species).
23
+
22
24
### ``DynamicModel``
23
25
24
26
This class is a container for properties obtained running a simulation.
25
27
26
28
The constructor has arguments for: static model, and the following:
27
29
28
-
*``start_time``, ``end_time`, ``num_point``
29
30
*``jacobian_collection_arr`` the Jacobians at each of the timepoints
30
31
*``timepoint_arr`` is the times at which simulation results are reported
31
-
*``forced_input_collection_arr`` an array of arrays of forced inputs calculated at each timepoint
32
+
*``forcing_input_collection_arr`` an array of arrays of forced inputs calculated at each timepoint
32
33
*``timecourse_df`` is the timecourse for the dynamics
33
34
34
35
The following are properties calculated from the properties above:
35
36
36
37
*``jacobian_median_arr`` is the median of the values in ``jacobian_collection_arr``, a computed property.
37
38
*``jacobian_std_arr`` is the standard deviation of Jacobian values, a computed property.
39
+
*``start_time``, ``end_time``, ``num_point``
38
40
39
41
The following are external methods:
40
42
41
-
*``makeSubmodel(start_time, end_time)`` uses a subset of the dynamical data (as specified by start and end) to construct a new dynamical model that copies of subset of the data in the current model into the new model.
42
-
*``makeModel(start_time, end_time, num_point, StaticModel)`` runs simulations to collect
43
+
*``makeSubmodel(start_time, end_time)`` uses a subset of the dynamical data (as specified by start and end) to construct a new dynamical model that copies of subset of the data in the current model into the new model. This method uses slicing to obtain values for constructing a new DynamicModel.
44
+
*``makeFromSimulation(start_time, end_time, num_point, StaticModel)`` is a class method that runs simulations to obtain the arguments for the DynamicModel constructor. This is the only method in DynamicModel that uses roadrunner. If the model_name begins with "BIOMD", then: (a) the model is in BIOMODELS_DIR and (b) ``end_time`` is obtained from the module ``biomodels_iterator``. ``end_time=None`` triggers autodetect of ``end_time``.
45
+
*``_makeEndtime`` is a method formerly in LRoadrunner.
43
46
44
47
### ``LinearModelPredictor``
45
48
46
-
This class does linear prediction and evaluations of these predictions. It is constructed with a ``DynamicModel`` and ``num_step``, the number of steps ahead to do the prediction. It has the following methods
49
+
This class does linear prediction and evaluations of these predictions. It is constructed with a ``DynamicModel``, ``jacobian_selection`` and ``num_step``, the number of steps ahead to do the prediction. It has the following methods
47
50
48
51
*``predict`` provides predictions for the timecourse of the ``DynamicModel``.
49
52
*``score`` scores the prediction using the Score class.
50
53
*``plotPrediction`` plots the timecourse and the prediction from the ``start_time`` to the ``end_time``
51
54
52
55
### ``Score``
56
+
* We will use ``makeScoreInfo`` to construct the various score metrics to evaluate the quality of a prediction.
53
57
54
58
### ``MultipleLinearPredictor``
55
59
56
-
This class performs piece-wise linear prediction. It is constructed wtih a DynamicModel, ``num_step``, and a collection of timepoints a which a new dynamic model is constructed.
60
+
This class performs piece-wise linear prediction. The times at which
61
+
there is a partition of the linear model is a "split point". Using slicing, we can easily construct the DynamicModels for a collection of split points. (Of course, all will have the same StaticModel.) If there are n split points, then there are n + 1 linear models.
62
+
Note that the old Trajectory.sequentialPartition / nonsequentialPartition aren't mentioned beause their implementation is deferred.
63
+
* When splitting a ``DynamicModel``, slicing is used, not simulation.
57
64
58
65
*``predict``
59
66
*``score``
60
67
*``plotPrediction`` The plot shows predicted and actual (simulated) values with vertical dashed lines to indicate regions for submodels.
61
68
69
+
70
+
62
71
## To Do
63
72
64
73
### Prompts
@@ -67,5 +76,4 @@ This class performs piece-wise linear prediction. It is constructed wtih a Dynam
67
76
1. Review the design and provide comments on where confusions exist as well as where improvements can be made. Do not implement yet.
68
77
1. Implement StaticModel as described in @model_based_design.md and associated tests.
69
78
2. Implement DynamicModel as described in @model_based_design.md and associated tests.
0 commit comments