setu.discrete_nle_to_numpyro#

setu.discrete_nle_to_numpyro(discrete_nle, theta, x_observed, *, conditions=None, name='discrete_nle_likelihood')[source]#

Add DiscreteNLE log-likelihood as a factor in the active NumPyro model.

Delegates to to_numpyro (which accepts any likelihood estimator). DiscreteNLE shares the log_prob interface with NLE/MixedNLE.

Parameters:
  • discrete_nle (LikelihoodEstimator) – Trained DiscreteNLE instance.

  • theta (Array) – JAX array from numpyro.sample(), shape (theta_dim,).

  • x_observed (Array) – Observed discrete data, shape (n_obs, x_dim) or (x_dim,).

  • conditions (Array | None) – Optional conditions, shape (n_obs, condition_dim).

  • name (str) – Name for the factor site.

Return type:

None