dot-nll function

Calculate negative log-likelihood