nltk.log_likelihood()

nltk.log_likelihood(reference, test)[source]

Given a list of reference values and a corresponding list of test probability distributions, return the average log likelihood of the reference values, given the probability distributions.

Parameters:
  • reference (list) – A list of reference values
  • test (list(ProbDistI)) – A list of probability distributions over values to compare against the corresponding reference values.