def score(self, x, startprob, transmat):
    'Log probability for a given data `x`.\n\n        Attributes\n        ----------\n        x : ndarray\n            Data to evaluate.\n        %(_doc_default_callparams)s\n\n        Returns\n        -------\n        log_prob : float\n            The log probability of the data.\n\n        '
    log_transmat = np.log((transmat + np.finfo(float).eps))
    log_startprob = np.log((startprob + np.finfo(float).eps))
    log_prior = log_startprob[x[:, 0]]
    n = x.shape[0]
    nstates = log_startprob.shape[0]
    logp = np.zeros(n)
    for i in range(n):
        njk = accum(np.vstack([x[i, 0:(- 1)], x[i, 1:]]).T, 1, size=(nstates, nstates), dtype=np.int32)
        logp[i] = np.sum((njk * log_transmat))
    return (logp + log_prior)
Log probability for a given data `x`.

Attributes
----------
x : ndarray
    Data to evaluate.
%(_doc_default_callparams)s

Returns
-------
log_prob : float
    The log probability of the data.
def score(self, x, startprob, transmat):
    'Log probability for a given data `x`.\n\n        Attributes\n        ----------\n        x : ndarray\n            Data to evaluate.\n        %(_doc_default_callparams)s\n\n        Returns\n        -------\n        log_prob : float\n            The log probability of the data.\n\n        '
    log_transmat = np.log((transmat + np.finfo(float).eps))
    log_startprob = np.log((startprob + np.finfo(float).eps))
    log_prior = log_startprob[x[:, 0]]
    n = x.shape[0]
    nstates = log_startprob.shape[0]
    logp = np.zeros(n)
    for i in range(n):
        njk = accum(np.vstack([x[i, 0:(- 1)], x[i, 1:]]).T, 1, size=(nstates, nstates), dtype=np.int32)
        logp[i] = np.sum((njk * log_transmat))
    return (logp + log_prior)