Replies: 3 comments 3 replies
-
Hi Daniel, this is an interesting idea that also makes me a bit uncomfortable - simply in that the height each histogram reaches feels like it isn't something that should be user configurable. It's a PDF, after all, so the height is whatever is needed to ensure the area is one. We've had some issues in the past with spiky histograms due to lack of sampling, but the answer to that has always been to bite the bullet and sample a bunch more until you get well defined marginal distributions and then whatever height they come out to is what you get. Do you have a screenshot of some of the more misbehaving histograms you can share? |
Beta Was this translation helpful? Give feedback.
-
Aaaaah okay I am following more now what's happening. Yeah, I'll add in a
relative weight, though for simplicity for other users I might do it such
that the height is fixed, and if you want proportionality to the number of
samples or such, that can be calculated outside ChainConsumer and passed in
:)
…On Thu, Apr 18, 2024 at 6:54 PM Daniel Reese ***@***.***> wrote:
Hi Samuel, yes, I agree with what you are saying about the surface area
beneath a PDF being one. However, I probably didn't explain myself very
well yesterday. I'm not worried about PDFs having a spiky appearance - that
is a separate issue which can be resolved by increasing the number of
samples as described in your answer. What my intern and I are doing is
splitting up a single PDF according to its modes. Hence, what we would like
is that the sum of the surface areas between the different components to
add up to one. Furthermore, we would like to do it with appropriate weights
(i.e. proportional to the number of samples) so that a component with a
small probability has a surface area in accordance with this. This then
ensures that adding up the individual components reproduces the original
total PDF. Attached are some plots which illustrate the issue. example.zip
<https://github.com/Samreay/ChainConsumer/files/15022385/example.zip>
—
Reply to this email directly, view it on GitHub
<#123 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTPSWJUEWYHW7MTGN6ECK3Y56C5TAVCNFSM6AAAAABGK73M3WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCNJSGQZDM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey @dreese80, feel free to update chainconsumer to 1.1.0 and let me know if |
Beta Was this translation helpful? Give feedback.
-
Currently, an intern of mine is working on clustering MCMC samples, i.e. separating it into different groups based on local maxima in the posterior probability distribution. We have been using chainconsumer to render these different clusters using different colors, and chainconsumer does a very nice job. However, we noticed that with this strategy, a cluster with few samples will be given the same weight as one with many samples. This can lead to misleading histograms (along the diagonal of the corner plot) by overemphasizing small clusters. We therefore thought it would be a useful feature to add a weight field to the chain object and use this to weight the individual histograms shown along the diagonal. Attached is a modified version of chainconsumer that achieves this (in case it is useful). chainconsumerweight.zip
Beta Was this translation helpful? Give feedback.
All reactions