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 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

inline 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[in] 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[in] Number of open states. The open states must be in the top left corner of the Q-matrix.

  • _tau[in] Maximum length of the missed events

  • _tcritical[in] Parameter for CHS vectors (see colquhoun:1996) if positive. If negative, then equilibrium vectors will be used as initial and final states (as in colquhoun:1982)

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

  • _xtol[in] Tolerance criteria for brentq().

  • _rtol[in] Tolerance criteria for brentq().

  • _itermax[in] Maximum number of iteration when calling brentq().

  • _lowerbound[in] Lower bound of the interval bracketing all roots. If None, the lower bound is obtained from find_lower_bound_for_roots().

  • _upperbound[in] Upper bound of the interval bracketing all roots. If None, the upper bound is obtained from find_upper_bound_for_roots().

inline t_rvector vector(t_rmatrix const &_Q) const

Computes likelihood for each burst.

Returns:

a HJCFIT::t_rvector

t_rvector vector(QMatrix const &_Q) const

Computes likelihood for each burst.

Returns:

a HJCFIT::t_rvector

inline 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 vectors rather than CHS vectors.

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.

t_int omp_num_threads

Number of openmp threads to use in parallel likelihood calculations.