Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the loglikelhood cost go negative ? #12

Open
malzantot opened this issue Dec 21, 2016 · 4 comments
Open

Can the loglikelhood cost go negative ? #12

malzantot opened this issue Dec 21, 2016 · 4 comments

Comments

@malzantot
Copy link

Hi,

I have modified the code to handle another type of data where the output gaussians are uni-variate. However, I noticed while training the model that the log likelihood cost goes negative and keeps decreasing ? I wonder if this negative likelihood is sensible , as while your training your model too sometimes I notice negative cost values reported for one or two batches ? Or it means that I have potentially made some bugs while modifying the code.

Thanks,
Moustafa

@hardmaru
Copy link
Owner

hardmaru commented Dec 21, 2016 via email

@malzantot
Copy link
Author

Hi,

Thanks a lot for your reply. I will have a look at the paper.
Your code output looks OK, but my experiments with other data and the univariate gaussian does not produce reasonable output yet.

I was wondering what is the significance of negative log likelihood. ? Since the likelihood is a multiplication of probability values ( 0 <= p(x) <= 1' ), I expected (-infty <= log p(x) <= 0') and therefore, (0 <= log p(x) <= infty) .

@soi
Copy link

soi commented Aug 19, 2017

@malzantot was wondering about this as well, please take a look at this to clarify: https://stats.stackexchange.com/questions/4220/can-a-probability-distribution-value-exceeding-1-be-ok

@malzantot
Copy link
Author

@soi I found it later as well, it is because this is a PDF (probability density function) which can have a value > 1, unlike the PMF (probability mass function) which is always in [0, 1].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants