-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Histogram distribution plot fails on hist, succeeds on KDE #1104
Comments
A flatten is missing. To get 4 plots, However, I have just seen that |
@OriolAbril Thanks. That helped. BTW, I tried using I find that the Arviz plots put their suptitles way up high, which means it's hard to stack them without them overlapping. Presumably using |
Hi, there @OriolAbril @rpgoldman . I am new here and would like to take up this issue. I have already solved half of it locally .I would like to solve it. Will you assign me this issue please? |
No need to be assigned, with issues with nobody working on them just say you'll work on it in order to avoid duplicated work. We have a more detailed description on the contributing guide. We count you are working on it now, do not hesitate to ask for guidance if you were to need any. |
Yes @OriolAbril , I have started working on it. I have already added the "flatten" and it seems to work fine. |
Currently the
You'll see in the code that the 2 last cases already behave as desired, however, the 2 first ones do not, this is what should be fixed. |
@OriolAbril , I have made the required changes but, I would like to highlight another possible problem related to this issue as follows- Trace Is this correct behaviour? What is your opinion on this? |
It is not supported for now. There are "problems" for assuming do we have draws + shape or chain + draws +shape. Does Dataarray contain axis names? And coordinates? I mean if we have a good way handle these, then we should implement these. |
It would be a good idea to add dataarray case to convert to inference data. It'd be great if you could make a PR for each feature. I have two comments on the code above. To plot only err_sd, you should use The second comment is that even though credible interval is None, the line is still there 🤔 |
@ahartikainen Yes, Dataarray has all these information. You can refer following text file @OriolAbril I am sorry for posting the wrong image previously. The correct image for that code snippet is And also, I would like to add support for DataArray if possible. But, first I will make a pull request for existing issue. |
You can create another PR for Dataarray |
Ok, I will create another PR. |
Describe the bug
I was plotting posterior data from an InferenceData object, and the KDE worked fine. But I was interested to see more exactly what the samples looked like, so I tried plotting with a histogram instead. This errored out, with the backtrace below.
To the extent I can tell, it looks like Arviz grabbed up a multi-dimensional array (
chains
xsamples
xinputs
, 4 x 500 x 4) and instead of flattening it -- as the KDE seems to have done -- or splitting it out into four plots for theinputs
dimension), it errored out.To Reproduce
Steps to reproduce the behavior. Ideally a self-contained snippet of code, or link to a notebook or external code. Please include screenshots/images produced with ArviZ here, or the stacktrace including
arviz
code to help.Expected behavior
I expected to get a histogram plot, or possibly four.
Alternatively, if I was using this wrong, I would expect to get an error for the KDE case as well as the basis case.
Additional context
master
.Backtrace
The text was updated successfully, but these errors were encountered: