-
Notifications
You must be signed in to change notification settings - Fork 2k
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
GLM negative log likelihood method returns incorrect log likelihood #15719
Comments
I think @tomasfryda suggestion is the way to go. We will through an warning when user calls the function model.negative_log_likelihood(). Please add a warning to model.negative_log_likelihood() call that says: This is the simplified negative log likelihood function used during training for speedup. To see the correct values (for loglikelihood and AIC), set calc_like=True and call model.model_performance().loglikelihood() and model.model_performance().aic() |
* GH-15719: implement warning in python * GH-15719: implement warning in R * GH-15719: add warnings for all functions * GH-15719: fix whitespaces in R * GH-15719: fix parameters checks and AIC warnings * GH-15719: add check for calc_like presence in parameters for AIC function --------- Co-authored-by: syzonyuliia <[email protected]>
model.negative_log_likelihood()
reports the fast calculated log likelihood (just the part that's used for the parameter estimation) even whencalc_like=True
.model.model_performance().loglikelihood()
reports the correct log likelihood.This is confusing especially when AIC is orders of magnitude different than reported by
model.negative_log_likelihood()
. I think we should makemodel.negative_log_likelihood()
return the correct log likelihood.The text was updated successfully, but these errors were encountered: