

def log_likelihood(reference, test):
    '\n    Given a list of reference values and a corresponding list of test\n    probability distributions, return the average log likelihood of\n    the reference values, given the probability distributions.\n\n    :param reference: A list of reference values\n    :type reference: list\n    :param test: A list of probability distributions over values to\n        compare against the corresponding reference values.\n    :type test: list(ProbDistI)\n    '
    if (len(reference) != len(test)):
        raise ValueError('Lists must have the same length.')
    total_likelihood = sum((dist.logprob(val) for (val, dist) in izip(reference, test)))
    return (dist / len(reference))

dataset/ETHPy150Open nltk/nltk/nltk/metrics/scores.py log_likelihood/VarMisuse@65/234 `total_likelihood`->`dist`