You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of estimating the PDF and drawing contours with plt.contour, we could directly use credible intervals (fastCI) in y-direction to compute the contours. This avoids typical KDE/PDF-estimation problems like many of the fluctuations due to sample density. It would also allow drawing lines corresponding to lower and upper bounds.
I plan to make a PR for this eventually, just wanted to mention this here already; if anyone is interested in having this right now send me an email and I'll be happy to help!
I will finish my PR in anesthetic first, but in principle this method also works very well for fgivenx. I have just implemented fgivenx with credibility intervals for a project here (will add examples later).
The text was updated successfully, but these errors were encountered:
It cannot. Fundamentally you cannot compute arbitrary multi-modal iso-PDF intervals based on samples, without assuming some KDE or smoothness of the PDF, because you could always choose tiny intervals around the samples with almost zero volume.
(This isn't meant as a replacement of kde of course, but you can use it if you know/see it's unimodal.)
What we might be able to do:
Just say this is only for Highest Prior Density Interval as in, single interval, rather than iso-PDF / waterline method.
Fix number of modes and find the set of N intervals including 68% of the points while minimizing the sum of the volumes of the intervals. I believe this optimization problem might be not-too-hard since the optimizations of will be independent, i.e. N 1d minimizers rather than 1 Nd minimizer. But not 100% sure about this, haven't tried this. Maybe one can do evidence-based selection of N but now it becomes rather complex.
Instead of estimating the PDF and drawing contours with plt.contour, we could directly use credible intervals (fastCI) in y-direction to compute the contours. This avoids typical KDE/PDF-estimation problems like many of the fluctuations due to sample density. It would also allow drawing lines corresponding to lower and upper bounds.
I plan to make a PR for this eventually, just wanted to mention this here already; if anyone is interested in having this right now send me an email and I'll be happy to help!
I will finish my PR in anesthetic first, but in principle this method also works very well for fgivenx. I have just implemented fgivenx with credibility intervals for a project here (will add examples later).
The text was updated successfully, but these errors were encountered: