gwkokab.analysis.core.analysis_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 AnalysisBase |
Module Contents¶
- class gwkokab.analysis.core.analysis_base.AnalysisBase(*, analysis_name: str, check_leaks: bool, debug_nans: bool, model: numpyro.distributions.distribution.Distribution | collections.abc.Callable[Ellipsis, numpyro.distributions.distribution.Distribution], poisson_mean_filename: str, prior_filename: str, profile_memory: bool, sampler_cfg, variance_cut_threshold: float | None)¶
Bases:
gwkokab.analysis.core.utils.PRNGKeyMixinAnalysisBase 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.
- classify_model_parameters() Tuple[Dict[str, int | float | bool | None], gwkokab.models.utils.JointDistribution, Dict[str, int], Dict[str, int]]¶
Classify model parameters into constants, priors, and variables index.
- abstractmethod driver(*, logpdf: collections.abc.Callable[[jaxtyping.Array, Dict[str, Any]], jaxtyping.Array], priors: gwkokab.models.utils.JointDistribution, data: Any, labels: List[str]) None¶
- modify_model_params(params: dict) dict¶
Hook for subclasses to modify parameters before model instantiation.
- analysis_name¶
- check_leaks¶
- debug_nans¶
- model¶
- property model_parameters: List[str]¶
- Abstractmethod:
Returns the model parameters.
- Returns:
List of model parameters.
- Return type:
List[str]
- Raises:
NotImplementedError – If the AnalysisBase class is used directly, this method raises a NotImplementedError. It is expected that subclasses of AnalysisBase will implement this method.
- property parameters: List[str] | Tuple[str, Ellipsis]¶
- Abstractmethod:
Returns the parameters (intrinsic + extrinsic).
- Returns:
List or tuple of parameter names.
- Return type:
- Raises:
NotImplementedError – If the AnalysisBase class is used directly, this method raises a NotImplementedError. It is expected that subclasses of AnalysisBase will implement this method.
- poisson_mean_filename¶
- prior_filename¶
- profile_memory¶
- sampler_cfg¶
- variance_cut_threshold¶
- gwkokab.analysis.core.analysis_base.analysis_base_arg_parser(parser: argparse.ArgumentParser) argparse.ArgumentParser¶
Populate the command line argument parser with the arguments for the AnalysisBase script.
- Parameters:
parser (ArgumentParser) – Parser to add the arguments to
- Returns:
the command line argument parser
- Return type:
ArgumentParser