Skip to content

Commit 9d18f80

Browse files
author
Martin Ingram
committed
Rename to optimizer_method and drop jac=True
1 parent d648105 commit 9d18f80

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pymc_extras/inference/dadvi/dadvi.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def fit_dadvi(
2828
random_seed: RandomSeed = None,
2929
n_draws: int = 1000,
3030
keep_untransformed: bool = False,
31-
opt_method: minimize_method = "trust-ncg",
31+
optimizer_method: minimize_method = "trust-ncg",
3232
**minimize_kwargs,
3333
) -> az.InferenceData:
3434
"""
@@ -60,7 +60,7 @@ def fit_dadvi(
6060
Whether or not to keep the unconstrained variables (such as
6161
logs of positive-constrained parameters) in the output.
6262
63-
opt_method: str
63+
optimizer_method: str
6464
Which optimization method to use. The function calls
6565
``scipy.optimize.minimize``, so any of the methods there can
6666
be used. The default is trust-ncg, which uses second-order
@@ -109,8 +109,7 @@ def fit_dadvi(
109109
result = minimize(
110110
f_fused,
111111
np.zeros(2 * n_params),
112-
method=opt_method,
113-
jac=True,
112+
method=optimizer_method,
114113
hessp=f_hessp,
115114
**minimize_kwargs,
116115
)

0 commit comments

Comments
 (0)