-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add smoothing of contour plots using Gaussian filtering #268
Conversation
Codecov Report
@@ Coverage Diff @@
## master #268 +/- ##
==========================================
+ Coverage 55.60% 58.28% +2.68%
==========================================
Files 109 109
Lines 5257 5550 +293
==========================================
+ Hits 2923 3235 +312
+ Misses 2334 2315 -19
Continue to review full report at Codecov.
|
This is very nice - only, ImageFiltering would be quite a heavy additional dependency for BAT, it pulls in several other imaging-related packages that we don't need at all. Can we find a similar functionality/algorithms in a more statistics-oriented Julia package? |
We already depend on KernelDensity.jl, could we maybe do this via BivariateKDE? |
This was actually also my first idea. However, the things I tried with KDEs (and also with grid interpolations) did not really improve the contours. |
So, I removed the dependency on However, there are efforts for separating the filtering stuff from the image-related code in |
@oschulz GitHub Actions had some issues yesterday evening, so the CI failed or is still queued. I don't see the button to restart CI. Can you run this again somehow? |
Yes, I was wondering ... restarting it now. |
Nice! |
Allows smoothing of contour plots using Gaussian filtering (via ImageFiltering.jl).
Without smoothing:
![no_smoothing](https://user-images.githubusercontent.com/7093206/111028489-4142f500-83f7-11eb-838d-965e728ce951.png)
p = plot(samples, (:a, :c), st=:smallest_intervals_contour, bins=100, smoothing=0)
With smoothing:
![with_smoothing](https://user-images.githubusercontent.com/7093206/111028508-5ae43c80-83f7-11eb-9988-51bc3049fe32.png)
p = plot(samples, (:a, :c), st=:smallest_intervals_contour, bins=100, smoothing=1.5)
Also possible to smooth the dimensions separately:
![with_smoothing_y](https://user-images.githubusercontent.com/7093206/111028568-ba424c80-83f7-11eb-846b-8505e62e82df.png)
p = plot(samples, (:a, :c), st=:smallest_intervals_contour, bins=100, smoothing=(0, 1.5))
(Also replaced all remaining "local modes" by "marginal modes")