msmbuilder.MSMLib.log_likelihood

msmbuilder.MSMLib.log_likelihood(count_matrix, transition_matrix)[source]

log of the likelihood of an observed count matrix given a transition matrix

Parameters:

count_matrix : ndarray or sparse matrix

Transition count matrix.

transition_matrix : ndarray or sparse matrix

Transition probability matrix.

Returns:

loglikelihood : float

The natural log of the likelihood, computed as \(\sum_{ij} C_{ij} \log(P_{ij})\)

Versions