drbenvincent / darc_toolbox

Run adaptive decision making experiments
MIT License
16 stars 2 forks source link

new method (of Model class) to calculate log likelihood #61

Closed drbenvincent closed 5 years ago

drbenvincent commented 5 years ago

Write a method in the Model class to return the log likelihood of the data. This will be useful in general, but I'm doing this to resolve model comparison as part of #57.

It's basically just correct use of bernoulli.logpmf(responses, predicted_response_probabilities).

drbenvincent commented 5 years ago

Silly me. We already have this as Model.log_likelihood but the implementation is a bit hacky.

drbenvincent commented 5 years ago

The implementation was not wrong before. But now it's slightly improved and clearer with explicit use of the Bernoulli logpmf.