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

Give to the user the possibility to choose the likelihood to be used for inversion #7

Open
pierrePalud opened this issue Jan 16, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@pierrePalud
Copy link
Owner

As of today, the user can only use one likelihood model in inversion of real data : the one mixing additive and multiplicative noises, and censorship (beetroots.modelling.likelihoods.approx_censored_add_mult.py).
In some contexts, a user could want to remove the additive noise or the multiplicative noise, or not to include censorship in the model.
There are already classes implementing these likelihoods in beetroots.modelling.likelihoods, it would be nice to be able to use them in inversion.

Where to apply changes:

  1. In the input.yaml, there could be parameters
use_additive_noise: true
use_multiplicative_noise: true
use censorship: true

Or some parameters could become optional (that is, absent from the input file, or preferably set to none), such as the filename_err (for the additive noise standard deviation (std)) or the sigma_m_float_linscale (for the multiplicative noise std).

  1. In the SimulationRealDataNN class (in beetroots.simulations.astro.real_data.py) : methods setup(), that calls
  • the setup_observation() method from the SimulationRealData class, to import the data, additive noise std, etc.
  • the setup_posteriors() method from the SimulationMySampler class, to select the Likelihood class.

In this case : For now, the posterior is given a name model_name = f"mixing_{i}" (in SimulationMySampler.setup_posteriors()) that depend on the likelihood class. This could be generalized for other kinds of Likelihood classes, for clearer understanding of the sampling outputs.


The choice of the Likelihood class to use:

use_additive_noise: true
use_multiplicative_noise: true
use censorship: true

-> MixingModelsLikelihood (from beetroots.modelling.likelihoods.approx_censored_add_mult.py)

use_additive_noise: true
use_multiplicative_noise: true
use censorship: false

-> for now, MixingModelsLikelihood (need to define a simpler class ?)

use_additive_noise: false
use_multiplicative_noise: true
use censorship: true

-> CensoredLogNormalLikelihood (from beetroots.modelling.likelihoods.log_normal_censored.py)

use_additive_noise: false
use_multiplicative_noise: true
use censorship: false

-> LogNormalLikelihood (from beetroots.modelling.likelihoods.log_normal.py)

use_additive_noise: true
use_multiplicative_noise: false
use censorship: true

-> CensoredGaussianLikelihood (from beetroots.modelling.likelihoods.gaussian_censored.py)

use_additive_noise: true
use_multiplicative_noise: false
use censorship: false

-> GaussianLikelihood (from beetroots.modelling.likelihoods.gaussian.py)

@pierrePalud pierrePalud added the enhancement New feature or request label Jan 16, 2025
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

1 participant