Log10Likelihood

The purpose of this class is to provide an interface for maximizing the likelihood. It computes, for a given set of observed open and shut intervals, the likelihood \(\frac{\ln(L(Q))}{ln 10}\), where \(L(Q)\) is declared in the likelihood equation.

class DCProgs::Log10Likelihood

Likelihood of a set of bursts.

This functor takes as input a Q-matrix and returns the likelihood for a given set of bursts. It is, in practice, a convenience object with which to perform likelihood optimization.

At each call, it creates a likelihood object MissedEventsG using the input parameters given during initialization, and the Q-matrix given on input. It then returns the log10 likelihood for the set of bursts given on input.

Public Functions

Log10Likelihood(t_Bursts const &_bursts, t_uint _nopen, t_real _tau, t_real _tcritical = -1e0, t_uint _nmax = 2, t_real _xtol = 1e-10, t_real _rtol = 1e-10, t_uint _itermax = 100, t_real _lowerbound = quiet_nan, t_real _upperbound = quiet_nan)

Constructor

Parameters
  • _bursts -

    A vector of bursts. Each burst is a vector of intervals, starting with an open interval. The intervals should be prefiltered for the maximum missed-event length.

  • _nopen -

    Number of open states. The open states must be in the top left corner of the Q-matrix.

  • _tau -

    Maximum length of the missed events

  • _tcritical -

    Parameter for CHS vectors (see [2]) if positive. If negative, then equilibrium occupancies will be used as initial and final states (as in [1])

  • _nmax -

    The exact missed-event likelihood will be computed for \( t < n_{\mathrm{max}} \tau\)

  • _xtol -

    Tolerance criteria for brentq().

  • _rtol -

    Tolerance criteria for brentq().

  • _itermax -

    Maximum number of iteration when calling brentq().

  • _lowerbound -

    Lower bound of the interval bracketing all roots. If None, the lower bound is obtained from find_lower_bound_for_roots().

  • _upperbound -

    Upper bound of the interval bracketing all roots. If None, the upper bound is obtained from find_upper_bound_for_roots().

t_rvector vector(t_rmatrix const &_Q) const

Computes likelihood for each burst.

Return
a DCProgs::t_rvector

t_rvector vector(QMatrix const &_Q) const

Computes likelihood for each burst.

Return
a DCProgs::t_rvector

t_real operator()(t_rmatrix const &_Q) const

Log-likelihood.

t_real operator()(QMatrix const &_Q) const

Log-likelihood.

Public Members

t_Bursts bursts

Set of bursts for which to compute the likelihood.

t_uint nopen

Number of open states.

t_real tau

Max length of missed events.

t_real tcritical

\(t_{\mathrm{crit}}\).

If negative or null, will use equilibrium occupancies rather than CHS occupancies.

t_uint nmax

Number of intervals for which to compute exact result.

t_real xtol

Tolerance for root finding.

t_real rtol

Tolerance for root finding.

t_uint itermax

Maximum number of iterations for root finding.

t_real lower_bound

Lower bound bracketing all roots.

t_real upper_bound

Upper bound bracketing all roots.