nessai.evidence
===============

.. py:module:: nessai.evidence

.. autoapi-nested-parse::

   Functions related to computing the evidence.

   ..
       !! processed by numpydoc !!


Functions
---------

.. autoapisummary::

   nessai.evidence.logsubexp
   nessai.evidence.log_integrate_log_trap
   nessai.evidence.log_evidence_from_ins_samples


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

.. py:function:: logsubexp(x, y)

   
   Helper function to compute the exponential
   of a difference between two numbers

   Computes: ``x + np.log1p(-np.exp(y-x))``

   :Parameters:

       **x, y** : float or array_like
           Inputs














   ..
       !! processed by numpydoc !!

.. py:function:: log_integrate_log_trap(log_func, log_support)

   
   Trapezoidal integration of given log(func). Returns log of the integral.


   :Parameters:

       **log_func** : array_like
           Log values of the function to integrate over.

       **log_support** : array_like
           Log prior-volumes for each value.



   :Returns:

       float
           Log of the result of the integral.











   ..
       !! processed by numpydoc !!

.. py:function:: log_evidence_from_ins_samples(samples: numpy.ndarray) -> float

   
   Compute the log-evidence for a given set of samples from the importance
   nested sampler.


   :Parameters:

       **samples** : numpy.ndarray
           Array of samples from the importance nested samples. Must have the logW
           field.



   :Returns:

       float
           The log-evidence











   ..
       !! processed by numpydoc !!

