calculating average log likelihood & perplexity on training data