-
Notifications
You must be signed in to change notification settings - Fork 11
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
Output of hierarchical model unnecessarily contains fit for every single trial of parameters with regression formula. #497
Comments
Hi, Can you try specifying |
Hi, thanks for your reply! |
Yes we are working on that. Can you see if you can add a |
Let me just add that you can also add var_names to az.summary to avoid
outputting the deterministic trial level parameters, and that will speed it
up massively. You can also use var_names to exclude parameters (e.g. ~a )
…On Tue, Jul 23, 2024 at 12:36 PM Paul Xu ***@***.***> wrote:
Yes we are working on that. Can you see if you can add a var_names
argument to model.sample() with only the variables that you want to
include? According to PyMC documentation
<https://www.pymc.io/projects/docs/en/latest/api/generated/pymc.sample.html>,
you can override the default behavior which is to include all free and
deterministics.
—
Reply to this email directly, view it on GitHub
<#497 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG7TFGCJU36KMRB5KJC35TZN2BBXAVCNFSM6AAAAABLCV4JQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVG4YTSNJSGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It seems that there's no way to exclude variables in the InferenceData though, which can blow up when the model is complex. I have submitted an issue to bambi. bambinos/bambi#828 |
When fitting a hierarchical model like the one from the tutorial:
out will contain one row for the fitted v of every trial of every subject. This quickly grows to enormous sizes when fitting the model to actual experimental data. For instance, I have a total of 33k trials across 60 participants, and would like to formulate a regression formula for v and for z. The output is several GB large, and simply printing the summary of the inference object to check whether the chains converged takes forever.
It does this also when I change the regression formula to something like
v ~ 1 + (1|subject)
, so that v does not change from trial to trial for each individual subject.Is there a way to suppress the outputting of the fitting results for each individual trial, and only get the output at group-level, or at subject-level?
Furthermore, in the tutorial,
az.plot_forest(model_reg_v_angle_hier.traces)
plots the values for v for the individual subjects. But when I copy the tutorial code as is, it tries to plot one row for v per trial, across all subjects (>3k trials).I use hssm version 0.2.1 on Ubuntu 22.04. with python 3.10.12.
The text was updated successfully, but these errors were encountered: