evaluma.methods.bayesian
========================

.. py:module:: evaluma.methods.bayesian


Functions
---------

.. autoapisummary::

   evaluma.methods.bayesian.compute_bayesian


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

.. py:function:: compute_bayesian(scores_matrix: pandas.DataFrame, *, rope=0.01, reference=None, pairs=None, random_state=None) -> evaluma.results.BayesianResult

   Compute pairwise Bayesian comparisons using a signed-rank test.

   For each pair, :func:`baycomp.two_on_multiple` returns the posterior
   probability that model A is better, that they are practically
   equivalent (within ``rope``), and that model B is better.

   :param scores_matrix: Normalized model × dataset score matrix.
   :param rope: Region of practical equivalence half-width **in normalized
                score space (0–1)**. Differences smaller than ``rope`` are
                treated as practically equivalent.
   :param reference: If provided, only compare every other model against this
                     reference model.
   :param pairs: Explicit list of ``(model_a, model_b)`` pairs to test.
                 Overrides ``reference``.
   :param random_state: Seed forwarded to baycomp.

   :returns: Result with ``.table`` containing columns
             ``model_a``, ``model_b``, ``p_a_better``, ``p_equiv``,
             ``p_b_better``.
   :rtype: BayesianResult


