Skip to content

Commit 2c2f202

Browse files
committed
Updated documentation files driver.rst and datarec.rst
1 parent cfb8d60 commit 2c2f202

3 files changed

Lines changed: 28 additions & 12 deletions

File tree

doc/OnlineDocs/explanation/analysis/parmest/datarec.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@ The following example returns model values from a Pyomo Expression.
5050
... return expr
5151

5252
>>> pest = parmest.Estimator(exp_list, obj_function=SSE, solver_options=None)
53+
INFO: Model has expected labels.
54+
WARNING: DEPRECATED: You're using a deprecated input to the `obj_function` argument by passing a custom function.
55+
This usage will be removed in a future release. Please update to the new parmest interface using the built-in 'SSE'
56+
and 'SSE_weighted' objectives. (deprecated in 6.9.3.dev0)
5357
>>> obj, theta, var_values = pest.theta_est(return_values=['response_function'])
5458
>>> #print(var_values)

doc/OnlineDocs/explanation/analysis/parmest/driver.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ Section.
8484

8585
>>> import pyomo.contrib.parmest.parmest as parmest
8686
>>> pest = parmest.Estimator(exp_list, obj_function=SSE)
87+
INFO: Model has expected labels.
88+
WARNING: DEPRECATED: You're using a deprecated input to the `obj_function` argument by passing a custom function.
89+
This usage will be removed in a future release. Please update to the new parmest interface using the built-in 'SSE'
90+
and 'SSE_weighted' objectives. (deprecated in 6.9.3.dev0)
8791

8892
Optionally, solver options can be supplied, e.g.,
8993

@@ -92,6 +96,10 @@ Optionally, solver options can be supplied, e.g.,
9296

9397
>>> solver_options = {"max_iter": 6000}
9498
>>> pest = parmest.Estimator(exp_list, obj_function=SSE, solver_options=solver_options)
99+
INFO: Model has expected labels.
100+
WARNING: DEPRECATED: You're using a deprecated input to the `obj_function` argument by passing a custom function.
101+
This usage will be removed in a future release. Please update to the new parmest interface using the built-in 'SSE'
102+
and 'SSE_weighted' objectives. (deprecated in 6.9.3.dev0)
95103

96104

97105
List of experiment objects

pyomo/contrib/parmest/parmest.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,18 +1662,22 @@ def cov_est(
16621662
"""
16631663
Covariance matrix calculation using all scenarios in the data
16641664
1665-
Argument:
1666-
method: string ``method`` object specified by the user
1667-
options - 'finite_difference', 'reduced_hessian',
1668-
and 'automatic_differentiation_kaug'
1669-
solver: string ``solver`` object specified by the user, e.g., 'ipopt'
1670-
cov_n: integer, number of datapoints specified by the user which is used
1671-
in the objective function
1672-
step: float used for relative perturbation of the parameters, e.g.,
1673-
step=0.02 is a 2% perturbation
1665+
Parameters
1666+
----------
1667+
method: string, optional
1668+
Options - 'finite_difference', 'reduced_hessian',
1669+
and 'automatic_differentiation_kaug'
1670+
solver: string, optional
1671+
E.g., 'ipopt'
1672+
cov_n: integer, required
1673+
Number of datapoints used in the covariance calculation
1674+
step: float, optional
1675+
The value used for relative perturbation of the parameters, e.g.,
1676+
step=0.02 is a 2% perturbation
16741677
1675-
Returns:
1676-
cov: pd.DataFrame, covariance matrix of the estimated parameters
1678+
Returns
1679+
-------
1680+
cov: pd.DataFrame, covariance matrix of the estimated parameters
16771681
"""
16781682
# check if the solver input is a string
16791683
if not isinstance(solver, str):
@@ -1687,7 +1691,7 @@ def cov_est(
16871691

16881692
# check if the user-supplied number of datapoints is an integer
16891693
if not isinstance(cov_n, int):
1690-
raise TypeError("Expected an integer for 'cov_n' argument.")
1694+
raise TypeError("Expected an integer for the 'cov_n' argument.")
16911695

16921696
# number of unknown parameters
16931697
num_unknowns = max(

0 commit comments

Comments
 (0)