Working matlab model

Calculates the log-likelihood of the test set.