gwkokab.inference.flowMC_analytical_gwalk_poisson_likelihood¶
FlowMC log-posterior over per-event Gaussian summaries.
The counterpart of
flowMC_discrete_poisson_likelihood for the analytical
GWalk data representation, where each event is a mean and covariance rather than a
cloud of posterior samples.
Functions¶
Build the flowMC log-posterior for the analytical GWalk data representation. |
Module Contents¶
- gwkokab.inference.flowMC_analytical_gwalk_poisson_likelihood.flowMC_analytical_gwalk_poisson_likelihood(dist_fn: Callable[..., numpyro.distributions.Distribution], priors: gwkokab.models.utils.JointDistribution, variables: Dict[str, numpyro.distributions.Distribution], constant_params: Dict[str, Any], variables_index: Dict[str, int], poisson_mean_estimator: Callable[[gwkokab.models.utils.ScaledMixture], tuple[jaxtyping.Array, jaxtyping.Array]], variance_cut_threshold: float | None) Callable[[jaxtyping.Array, Dict[str, Any]], jaxtyping.Array][source]¶
Build the flowMC log-posterior for the analytical GWalk data representation.
The likelihood is that of the inhomogeneous Poisson process,
\[\log\mathcal{L}(\Lambda) \propto -\mu(\Lambda) + \sum_{n=1}^N \log \int \ell_n(\lambda)\,\rho(\lambda\mid\Lambda) \,\mathrm{d}\lambda\]where \(\rho(\lambda\mid\Lambda) = \mathrm{d}N/\mathrm{d}V\,\mathrm{d}t\,\mathrm{d}\lambda\) is the merger rate density of a population parameterised by \(\Lambda\), \(\mu(\Lambda)\) is the expected number of detections for that population, and \(\ell_n(\lambda)\) is the likelihood for the \(n\)-th observed event’s parameters.
with the per-event integral evaluated over points resampled from each event’s Gaussian summary.
- Parameters:
dist_fn (Callable[..., Distribution]) – Builds the population model from the sampled variables and the constants.
priors (JointDistribution) – Joint prior over the sampled variables, ordered as
variables_indexsays.variables (Dict[str, Distribution]) – Unused here; flowMC takes its priors from
priorsas a joint distribution rather than site by site.constant_params (Dict[str, Any]) – Hyper-parameters frozen by the prior configuration rather than sampled.
variables_index (Dict[str, int]) – Maps each variable name to its position in the flat parameter vector. This is the ordering recorded as
variables_indexin the output HDF5.poisson_mean_estimator (Callable) – Estimator of \(\mu(\Lambda)\), returning
(mean, variance). Seegwkokab.poisson_mean.variance_cut_threshold (float | None) – Threshold above which the Monte Carlo variance of the estimate is penalised by
variance_tapering_fn().Nonedisables the penalty.
- Returns:
A
log_posterior(x, data)callable. Non-finite values are mapped to \(-\infty\), so the sampler rejects such points rather than propagating NaN.- Return type:
Callable[[Array, Dict[str, Any]], Array]