def log_likelihood(reference, test):
    if len(reference) != len(test):
        raise ValueError("Lists must have the same length.")

    # Return the average value of dist.logprob(val).
    total_likelihood = sum(dist.logprob(val)
                            for (val, dist) in izip(reference, test))
    return total_likelihood / len(reference)
Return etree element containing the XML representation of this content
dataset/ETHPy150Open nltk/nltk/nltk/metrics/scores.py/log_likelihood--crossover with--dataset/ETHPy150Open scanny/python-pptx/pptx/opc/pkgwriter.py/_ContentTypesItem._xml