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

Make var_names accessible in model.fit() #828

Open
digicosmos86 opened this issue Jul 24, 2024 · 3 comments
Open

Make var_names accessible in model.fit() #828

digicosmos86 opened this issue Jul 24, 2024 · 3 comments
Labels
enhancement good first issue If you want to contribute but are not sure where to get started, this issue is for you!

Comments

@digicosmos86
Copy link

In PyMC, pm.Sample() has a var_names parameter which allows the users to specify the variable names to be included in InferenceData. In Bambi, it seems that _run_mcmc() will override this argument when calling pm.sample(), leaving the users with no option to specify the variables that they want to include in the InferenceData. Maybe var_names can be added to model.fit() to make it possible to pass the user's own var_names?

@tomicapretto
Copy link
Collaborator

Do you have a particular use case in mind? In principle, I'm not against it. But I do see it causing things to fail if users pass var_names without knowing well what they're doing. Is your goal to exclude variables that are being included right now or to include variables that are excluded?

@digicosmos86
Copy link
Author

I think we want to be able to exclude certain parameters (especially deterministics) from InferenceData

@tomicapretto
Copy link
Collaborator

Are those deterministics computing parameters of the likelihood? Like mu or sigma in y ~ Normal(mu, sigma)? If that is the case, they are computed after the sampler finishes so it should not be really affecting computation time. Do you have a memory issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue If you want to contribute but are not sure where to get started, this issue is for you!
Projects
None yet
Development

No branches or pull requests

3 participants