gwkokab.analysis.core.analytical_base¶
Classes¶
AnalysisBase is a class which contains all the common functionality among the |
Functions¶
|
Populate the command line argument parser with the arguments for the |
Module Contents¶
- class gwkokab.analysis.core.analytical_base.AnalyticalBase(likelihood_fn: collections.abc.Callable[Ellipsis, collections.abc.Callable], model: numpyro.distributions.Distribution | collections.abc.Callable[Ellipsis, numpyro.distributions.Distribution], data_loader: gwkokab.analysis.core.inference_io.AnalyticalPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False, analysis_name: str = '')¶
Bases:
gwkokab.analysis.core.analysis_base.AnalysisBaseAnalysisBase is a class which contains all the common functionality among the different analyses.
It is not meant to be used directly, but rather to be subclassed by the specific analyses.
- Parameters:
likelihood_fn (Callable[..., Callable[..., Array]]) – A function that takes the model parameters and returns a function that computes the log-likelihood.
model (Union[Distribution, Callable[..., Distribution]]) – model to be used in the AnalyticalBase class. It can be a Distribution or a callable that returns a Distribution.
data_loader (AnalyticalPELoader) – data loader for the analytical PE data.
seed (int) – seed for the random number generator.
prior_filename (str) – path to the JSON file containing the prior distributions.
poisson_mean_filename (str) – path to the JSON file containing the Poisson mean configuration.
flowMC_settings_filename (str) – path to the JSON file containing the flowMC settings.
debug_nans (bool, optional) – If True, checks for NaNs in each computation. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.debug_nans.html#jax.debug_nans), by default False
profile_memory (bool, optional) – If True, enables memory profiling, by default False
check_leaks (bool, optional) – If True, checks for JAX Tracer leaks. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.checking_leaks.html#jax.checking_leaks), by default False
analysis_name (str, optional) – Name of the analysis, by default “”
- data_loader¶
- likelihood_fn¶
- n_samples¶
- gwkokab.analysis.core.analytical_base.analytical_arg_parser(parser: argparse.ArgumentParser) argparse.ArgumentParser¶
Populate the command line argument parser with the arguments for the AnalyticalBase script.
- Parameters:
parser (ArgumentParser) – Parser to add the arguments to
- Returns:
the command line argument parser
- Return type:
ArgumentParser