-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Julia implementation of r2_score
#285
Conversation
I know y and y_pred are magic, but I wonder if it should try to pair first variables (with or without _pred) in posterior and posterior_predictive groups, and then any xxx <--> xxx_pred |
I implemented this in a new utility function |
This PR implements
r2_score
in Julia.Computationally, the implementation is equivalent to Python's. However, it has a few extra convenience features:
(draws[, chains], noutputs)
for consistency with our other methods.NamedTuple
, similar toess_rhat
loo_pit
, it has a method that takes anInferenceData
, attempts to find they
andy_pred
data in it, and then permutes dims as required by the defaultr2_score
method.