Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue # 813 modified the way kwargs are handled #863

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions bambi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ def __init__(

def fit(
self,
draws=1000,
tune=1000,
draws=None,
tune=None,
discard_tuned_samples=True,
omit_offsets=True,
include_mean=None,
Expand Down Expand Up @@ -315,6 +315,16 @@ def fit(
`bmb.inference_methods.names['bayeux']['mcmc]`.
An `Approximation` object if `"vi"`.
"""
if draws is None:
draws = 1000
else:
kwargs["num_steps"] = draws

if tune is None:
tune = 1000
else:
kwargs["num_adapt_draws"] = tune

method = kwargs.pop("method", None)
if method is not None:
if inference_method == "vi":
Expand Down
Loading