@@ -36,7 +36,7 @@ def find_constrained_prior(
36
36
) -> Dict [str , float ]:
37
37
"""
38
38
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`.
40
40
Note: only works for one- and two-parameter distributions, as there
41
41
are exactly two constraints. Fix some combination of parameters
42
42
if you want to use it on >=3-parameter distributions.
@@ -50,24 +50,25 @@ def find_constrained_prior(
50
50
Lower bound to get `mass` % of probability of `pm_dist`.
51
51
upper : float
52
52
Upper bound to get `mass` % of probability of `pm_dist`.
53
- init_guess: Dict[ str, float]
53
+ init_guess : str or float
54
54
Initial guess for ``scipy.optimize.least_squares`` to find the
55
55
optimal parameters of `pm_dist` fitting the interval constraint.
56
56
Must be a dictionary with the name of the PyMC distribution's
57
57
parameter as keys and the initial guess as values.
58
- mass: float, default to 0.95
58
+ mass : float, default to 0.95
59
59
Share of the probability mass we want between ``lower`` and ``upper``.
60
60
Defaults to 95%.
61
- fixed_params: Dict[ str, float], Optional , default None
61
+ fixed_params : str or float, optional , default None
62
62
Only used when `pm_dist` has at least three parameters.
63
63
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
65
65
mu and sigma.
66
66
67
67
Returns
68
68
-------
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.
71
72
72
73
Examples
73
74
--------
0 commit comments