sequince.stats
==============

.. py:module:: sequince.stats


Functions
---------

.. autoapisummary::

   sequince.stats.ess_from_log_weights
   sequince.stats.ess_ratio_from_log_weights
   sequince.stats.cess_ratio_from_log_weights_and_increments


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

.. py:function:: ess_from_log_weights(log_weights)

   Return the effective sample size (ESS) as an array scalar.


.. py:function:: ess_ratio_from_log_weights(log_weights)

   Return ESS ratio (ESS / n) as an array scalar.


.. py:function:: cess_ratio_from_log_weights_and_increments(log_weights, log_increments)

   Return the conditional ESS ratio induced by log increments.

   The quantity computed is

       (sum_i W_i g_i)^2 / sum_i W_i (g_i)^2

   where W_i are the normalized current weights and g_i are the proposed
   incremental weights.

   See e.g. Eq 13 in arXiv:1612.06468 for more details.


