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: doc/OnlineDocs/explanation/analysis/parmest/driver.rst
+12-20Lines changed: 12 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,15 +82,12 @@ required packages for parameter estimation in parmest:
82
82
Step 1: Create the Experiment Class for the Model
83
83
-------------------------------------------------
84
84
85
-
parmest requires that the user creates an :class:`~pyomo.contrib.parmest.experiment.Experiment` class that
86
-
contains the annotated Pyomo model with labeled experiment outputs, unknown parameters, and measurement errors.
85
+
parmest requires that the user create an :class:`~pyomo.contrib.parmest.experiment.Experiment` class that
86
+
builds an annotated Pyomo model denoting experiment outputs, unknown parameters, and measurement errors using Pyomo `Suffix` components.
87
87
88
-
A labeled Pyomo model ``m`` has the following additional suffixes (Pyomo `Suffix`):
89
-
90
-
* ``m.experiment_outputs`` which defines experiment output (Pyomo `Param`, `Var`, or `Expression`)
91
-
and their associated data values (float, int).
92
-
* ``m.unknown_parameters`` which defines the mutable parameters or variables (Pyomo `Param` or `Var`)
93
-
to estimate along with their component unique identifier (Pyomo `ComponentUID`).
88
+
* ``m.experiment_outputs`` maps the experiment output, or measurement, terms in the model (Pyomo `Param`, `Var`, or `Expression`) to their associated data values (float, int).
89
+
* ``m.unknown_parameters`` maps the model parameters to estimate (Pyomo `Param` or `Var`)
90
+
to their component unique identifier (Pyomo `ComponentUID`) which is used to identify equivalent parameters across multiple experiments.
94
91
Within parmest, any parameters that are to be estimated are converted to unfixed variables.
95
92
Variables that are to be estimated are also unfixed.
96
93
@@ -165,12 +162,10 @@ mathematical model outlined in the introduction section of this Quick Start.
165
162
... returnself.model
166
163
167
164
168
-
Step 2: Load the Data and Create a List of the Model's Experiment Class
165
+
Step 2: Load the Data and Create a List Experiments
After creating an :class:`~pyomo.contrib.parmest.experiment.Experiment` class instance for the model, a list of the
172
-
model's :class:`~pyomo.contrib.parmest.experiment.Experiment` class for all the experimental data points should be
173
-
created.
168
+
Load the experimental data into Python and create an instance of your :class:`~pyomo.contrib.parmest.experiment.Experiment` class for each set of experimental data. In this example, each measurement of `y` is treated as a separate experiment.
174
169
175
170
.. doctest::
176
171
@@ -240,12 +235,9 @@ Optionally, solver options can be supplied, e.g.,
240
235
Objective function
241
236
^^^^^^^^^^^^^^^^^^
242
237
243
-
The second argument is an optional argument if the objective function has already been included in the
244
-
Pyomo model, which defines the optimization objective function to use in parameter estimation. However, if the
245
-
objective function has not been included in the Pyomo model, like the one in the :ref:`ExperimentClass` Section
246
-
above, the user is required to supply the second argument.
238
+
The second argument, ``obj_function``, is used to specify the objective function to use for parameter estimation if the user has not manually defined an objective function in their ``Experiment`` class.
247
239
248
-
If no objective function is specified, the Pyomo model is used "as is" and
240
+
If ``obj_function`` is not specified, the Pyomo model is used "as is" and
249
241
should be defined with "FirstStageCost" and "SecondStageCost"
250
242
expressions that are used to build an objective for the two-stage
251
243
stochastic programming problem.
@@ -254,14 +246,14 @@ If the Pyomo model is not written as a two-stage stochastic programming problem
254
246
this format, the user can select the "SSE" or "SSE_weighted" built-in objective
255
247
functions. If the user wants to use an objective that is different from the built-in
256
248
options, a custom objective function can be defined for parameter estimation. However,
257
-
covariance matrix estimation (see :ref:`covariancesection` Section) will not support this
258
-
custom objective function.
249
+
covariance matrix estimation (see :ref:`covariancesection` Section) is not supported
250
+
for custom objective functions.
259
251
260
252
Parmest includes two built-in objective functions ("SSE" and "SSE_weighted") to compute
261
253
the sum of squared errors between the ``m.experiment_outputs`` model values and
262
254
data values.
263
255
264
-
Step 3: Estimate the Parameters
256
+
Step 4: Estimate the Parameters
265
257
-------------------------------
266
258
267
259
After creating the :class:`~pyomo.contrib.parmest.parmest.Estimator` object with the desired objective function,
0 commit comments