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

model comparison #116

Open
PTWaade opened this issue May 13, 2024 · 3 comments
Open

model comparison #116

PTWaade opened this issue May 13, 2024 · 3 comments

Comments

@PTWaade
Copy link
Collaborator

PTWaade commented May 13, 2024

Need to save loglikelihoods - should be optional

@zeyus
Copy link
Collaborator

zeyus commented May 13, 2024

This is done with @addlogprob! right? It would also be possible to return an array (then use generated_quantities())

I was thinking to avoid an if statement in the model code it could be wrapped in a function that is created at runtime (before model execution) and either does nothing, or updates the log likelihood if it is enabled?

@PTWaade
Copy link
Collaborator Author

PTWaade commented May 16, 2024

Hmm no there are ways ot do it.

Here :
https://discourse.julialang.org/t/waic-or-loo-etc-in-turing/30873

And using ArviZ.jl is nice:
https://julia.arviz.org/ArviZ/stable/

It's a wrapper for the python ArviZ:
https://www.arviz.org/en/latest/

Basically, it will do most of the things for us for free. All we need to do is to give it the right outputs - you can see what is needed here:
https://julia.arviz.org/ArviZ/stable/quickstart/

I was thinking that perhaps fit_model could output a struct with all that information, and also the priors used and the agent etc.
Then plots and so on can just dispatch on that, and there can be a to_arviz function or somethin.

Might also be simpler ways of doing it.

@PTWaade
Copy link
Collaborator Author

PTWaade commented May 16, 2024

This wpuld be the best model comparison metric:
https://python.arviz.org/en/latest/api/generated/arviz.psislw.html

But there is also WAIC

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

2 participants