model =============== .. py:module:: jaxns.framework.model .. rubric:: :code:`jaxns.framework.model` .. rubric:: Module Contents .. py:class:: Model(prior_model, log_likelihood, params = None) Bases: :py:obj:`jaxns.framework.bases.BaseAbstractModel` Represents a Bayesian model in terms of a generative prior, and likelihood function. .. py:method:: __repr__() .. py:property:: num_params :type: int .. py:property:: params .. py:method:: set_params(params) Create a new parametrised model with the given parameters. :param params: The parameters to use. :returns: A model with set parameters. .. py:method:: __call__(params) Create a new parametrised model with the given parameters. **This is (and must be) a pure function.** :param params: The parameters to use. :returns: A model with set parameters. .. py:method:: init_params(rng) Initialise the parameters of the model. :param rng: PRNGkey to initialise the parameters. :returns: The initialised parameters. .. py:method:: __hash__() .. py:method:: sample_U(key) Sample from the prior model. :param key: PRNGKey to use. :returns: The sampled U. .. py:method:: sample_W(key) Sample from the prior model. :param key: PRNGKey to use. :returns: The sampled W. .. py:method:: transform(U) .. py:method:: transform_parametrised(U) .. py:method:: forward(U, allow_nan = False) .. py:method:: log_prob_prior(U) .. py:method:: prepare_input(U) .. py:method:: sanity_check(key, S)