probabilistic_model.monte_carlo_estimator
=========================================

.. py:module:: probabilistic_model.monte_carlo_estimator


Classes
-------

.. autoapisummary::

   probabilistic_model.monte_carlo_estimator.MonteCarloEstimator


Module Contents
---------------

.. py:class:: MonteCarloEstimator(model: probabilistic_model.probabilistic_model.ProbabilisticModel, sample_size: int = 100)

   This is a wrapper class for using monte carlo estimations of a model that can be sampled from and where the
   likelihood can be evaluated.


   .. py:attribute:: model
      :type:  probabilistic_model.probabilistic_model.ProbabilisticModel

      The wrapped model.



   .. py:attribute:: sample_size
      :type:  int

      The number of samples to use for the estimation.



   .. py:method:: l1_metric_but_with_uniform_measure(other: probabilistic_model.probabilistic_model.ProbabilisticModel)

      Calculate the L1 metric between the model and another model using a uniform measure over the union of both
      distributions to sample from.

      :param other: The other model to compare to.
      :return: The L1 metric between the two models.



   .. py:method:: l1_metric(other: probabilistic_model.probabilistic_model.ProbabilisticModel, tolerance: float = 1e-07) -> float

      Estimates the L1 metric between to models.

      :other: the other model.
      :tolerance: Tolerance to use for the comparison of likelihoods.
      Samples that have a likelihood in both models that differs by less than this tolerance are considered to have
      an equal likelihood.



