nessai.stopping_criteria
========================

.. py:module:: nessai.stopping_criteria

.. autoapi-nested-parse::

   Stopping criteria for nested sampling.

   This module defines various stopping criteria for nested sampling algorithms.

   ..
       !! processed by numpydoc !!


Classes
-------

.. autoapisummary::

   nessai.stopping_criteria.StoppingCriterionRegistry
   nessai.stopping_criteria.StoppingCriterion
   nessai.stopping_criteria.ESS
   nessai.stopping_criteria.LogEvidenceRatio
   nessai.stopping_criteria.LogEvidenceRatioNestedSamples
   nessai.stopping_criteria.EvidenceError
   nessai.stopping_criteria.DifferenceLogEvidence
   nessai.stopping_criteria.FractionalError


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

.. py:class:: StoppingCriterionRegistry

   
   Registry for stopping criteria.

   This class is used to register and retrieve stopping criteria classes.
   It allows for easy extension and management of different stopping criteria.















   ..
       !! processed by numpydoc !!

.. py:class:: StoppingCriterion

   
   Class for defining stopping criteria.


   :Parameters:

       **name** : str
           Name of the stopping criterion.

       **tolerance** : float
           Tolerance value for the stopping criterion.

       **comparison** : str
           Comparison operator for the stopping criterion.
               Valid options are: '<', '>', '<=', '>=', '==', '!='.














   ..
       !! processed by numpydoc !!

   .. py:method:: is_met(value: Union[float, int]) -> bool

      
      Check if the stopping criterion is met.


      :Parameters:

          **value** : float or int
              The value to compare against the stopping criterion.



      :Returns:

          bool
              True if the stopping criterion is met, False otherwise.











      ..
          !! processed by numpydoc !!


.. py:class:: ESS(tolerance: float = 5000.0)

   Bases: :py:obj:`StoppingCriterion`


   
   Effective sample size (ESS) stopping criterion.


   :Parameters:

       **tolerance** : float
           Tolerance value for the stopping criterion.














   ..
       !! processed by numpydoc !!

.. py:class:: LogEvidenceRatio(tolerance: float = 0.0)

   Bases: :py:obj:`StoppingCriterion`


   
   Log ratio of evidence between live points and all samples.


   :Parameters:

       **tolerance** : float
           Tolerance value for the stopping criterion.














   ..
       !! processed by numpydoc !!

.. py:class:: LogEvidenceRatioNestedSamples(tolerance: float = 0.0)

   Bases: :py:obj:`StoppingCriterion`


   
   Log ratio of evidence between live point and nested samples.


   :Parameters:

       **tolerance** : float
           Tolerance value for the stopping criterion.














   ..
       !! processed by numpydoc !!

.. py:class:: EvidenceError(tolerance: float = 0.1)

   Bases: :py:obj:`StoppingCriterion`


   
   Evidence error stopping criterion.


   :Parameters:

       **name** : str
           Name of the stopping criterion.

       **tolerance** : float
           Tolerance value for the stopping criterion.

       **comparison** : str
           Comparison operator for the stopping criterion.














   ..
       !! processed by numpydoc !!

.. py:class:: DifferenceLogEvidence(tolerance: float = 0.1)

   Bases: :py:obj:`StoppingCriterion`


   
   Difference in log evidence stopping criterion.

   This is the standard nested sampling stopping criterion.

   :Parameters:

       **tolerance** : float
           Tolerance value for the stopping criterion.














   ..
       !! processed by numpydoc !!

.. py:class:: FractionalError(tolerance: float = 0.1)

   Bases: :py:obj:`StoppingCriterion`


   
   Fractional error stopping criterion.


   :Parameters:

       **tolerance** : float
           Tolerance value for the stopping criterion.














   ..
       !! processed by numpydoc !!

