Skip to content

Commit 40964d7

Browse files
jlindbloomaloctavodia
authored andcommitted
updated docstring for find_constrained_prior
1 parent 7be9a19 commit 40964d7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

pymc/func_utils.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def find_constrained_prior(
3636
) -> Dict[str, float]:
3737
"""
3838
Find optimal parameters to get `mass` % of probability
39-
of `pm_dist` between `lower` and `upper`.
39+
of a `pm_dist` between `lower` and `upper`.
4040
Note: only works for one- and two-parameter distributions, as there
4141
are exactly two constraints. Fix some combination of parameters
4242
if you want to use it on >=3-parameter distributions.
@@ -50,24 +50,25 @@ def find_constrained_prior(
5050
Lower bound to get `mass` % of probability of `pm_dist`.
5151
upper : float
5252
Upper bound to get `mass` % of probability of `pm_dist`.
53-
init_guess: Dict[str, float]
53+
init_guess : str or float
5454
Initial guess for ``scipy.optimize.least_squares`` to find the
5555
optimal parameters of `pm_dist` fitting the interval constraint.
5656
Must be a dictionary with the name of the PyMC distribution's
5757
parameter as keys and the initial guess as values.
58-
mass: float, default to 0.95
58+
mass : float, default to 0.95
5959
Share of the probability mass we want between ``lower`` and ``upper``.
6060
Defaults to 95%.
61-
fixed_params: Dict[str, float], Optional, default None
61+
fixed_params : str or float, optional, default None
6262
Only used when `pm_dist` has at least three parameters.
6363
Dictionary of fixed parameters, so that there are only 2 to optimize.
64-
For instance, for a StudenT, you fix nu to a constant and get the optimized
64+
For instance, for a StudentT, you fix nu to a constant and get the optimized
6565
mu and sigma.
6666
6767
Returns
6868
-------
69-
The optimized distribution parameters as a dictionary with the parameters'
70-
name as key and the optimized value as value.
69+
opt_params: dict
70+
The optimized distribution parameters as a dictionary with the parameters' and
71+
name as key and the optimized value as value.
7172
7273
Examples
7374
--------

0 commit comments

Comments
 (0)