-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
How to calculate the mean of the specified chains and draws #2284
Comments
What do you mean by stuck? What do you get with |
No output after ~20 minutes running. |
Before calling the mean make sure selected posterior looks the way you expect it to look. Then take the first data_var and check again. Then call mean. Also make sure you want to use .sel and not .isel. Are you certain that selected draw and selected chain are good? |
Can you run this example normally? import arviz as az
data = az.load_arviz_data("centered_eight")
selected_posterior = data.posterior.sel(chain=[1,2], draw=list(range(422)))
print("selected_posterior:", selected_posterior[list(data.posterior.data_vars)[0]])
print("\nmean:", selected_posterior[list(data.posterior.data_vars)[0]].mean(("chain", "draw"))) |
trace = az.from_netcdf(trace_filepath)
selected_posterior = trace.posterior.sel(chain=selected_chains, draw=selected_draws)
selected_posterior[list(trace.posterior.data_vars)[0]].mean(("chain", "draw"))
why does the code get stuck when applying
mean
method toselected_posterior
?The text was updated successfully, but these errors were encountered: