msmbuilder.msm._ratematrix.loglikelihood

msmbuilder.msm._ratematrix.loglikelihood(theta, counts, n, t=1)

Log likelihood and gradient of the log likelihood of a continuous-time Markov model.

Parameters:

theta : array of shape = (n*(n-1)/2 + n) for dense or shorter

The free parameters of the model. These values are the (possibly sparse) linearized elements of the log of the upper triangular portion of the symmetric rate matrix, S, followed by the log of the equilibrium distribution.

counts : array of shape = (n, n)

The matrix of observed transition counts.

t : double

The lag time.

Returns:

logl : double

The log likelihood of the parameters.

grad : array of shape = (n*(n-1)/2 + n)

The gradient of the log-likelihood with respect to theta

Versions