Skip to content
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

Functionality to plot prior pdf (in constrained and unconstrained space) #52

Closed
bielim opened this issue Sep 15, 2021 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@bielim
Copy link
Contributor

bielim commented Sep 15, 2021

Proposal
I think that users would appreciate the ability to plot the pdf of a ParameterDistribution, both in unconstrained an in constrained space. E.g., one could provide a function plot_pdf(xarray::Array{<:Real,1}, pd::ParameterDistribution, constrained::Bool=false, kw...) that takes a parameter distribution and plots either the pdf of the unconstrained distribution or that of the constrained distribution.

Why?
In practice, the choice of priors is probably one of the most difficult aspects of using EnsembleKalmanProcesses.jl as it requires one to understand the concept of transformations between constrained and unconstrained spaces, and also because most scientists working with a model really tend to think about parameter distributions in the constrained model space (rather than in the unconstrained space where the algorithm takes place), since that is what they have some physical insight or intuition about. So it would be nice for them to see what the pdf in unconstrained space gets mapped into when sending it into the constrained space.

Implementing plotting capability in a reasonably general way (including high dimensions, distributions from correlated samples etc.) requires a lot of thought. But even an implementation that is limited to simple cases could be useful.

@bielim bielim added the enhancement New feature or request label Sep 15, 2021
@navidcy
Copy link
Contributor

navidcy commented Nov 8, 2021

I agree. A functionality to streamline visualising that is needed. Or even just a functionality that is able to provide a tuple of arrays, e.g. (parameter_values, pdf) is enough! This way we won't need to include plotting packages as dependencies of EnsembleKalmanProcesses.jl.

Have a look at
https://clima.github.io/OceanTurbulenceParameterEstimation.jl/dev/literated/perfect_baroclinic_adjustment_calibration/#Free-parameters

Would something like that work?

@odunbar
Copy link
Collaborator

odunbar commented Jun 8, 2023

We have now addressed this with the plot(prior) recipes for v1. This plots marginal histograms across the broad and heterogeneous types of priors we accommodate.

https://clima.github.io/EnsembleKalmanProcesses.jl/dev/parameter_distributions/#Plotting

@odunbar odunbar closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants