This is just a placeholder, the goal is to eventually have a function to compute the min_ss as discussed here. The original implementation is here. There a lot of other functions implemented (also discussed in the vignette from the first link), I think we don't want those other functions, at least not now.
I checked that I am getting the same result as in the vignette (to be sure I installed the Posterior package, I got the value of mu and converted it into a DataArray)
This is an example of how to run the function, first compute the k-hat and then the min_ss
sc = az.load_arviz_data("centered_eight")
mu = sc.posterior["mu"]
k = pareto_khat(mu)
ps_min_ss(k)
Notice that a lot of this code overlaps with the code necessary to compute the pareto smoothing part of the PSIS-CV-LOO method (notice the "log_weights" argument in the code in this PR). So eventually we will need to use some of this code for LOO too.
This is just a placeholder, the goal is to eventually have a function to compute the
min_ss
as discussed here. The original implementation is here. There a lot of other functions implemented (also discussed in the vignette from the first link), I think we don't want those other functions, at least not now.I checked that I am getting the same result as in the vignette (to be sure I installed the Posterior package, I got the value of mu and converted it into a DataArray)
This is an example of how to run the function, first compute the k-hat and then the min_ss
Notice that a lot of this code overlaps with the code necessary to compute the pareto smoothing part of the PSIS-CV-LOO method (notice the "log_weights" argument in the code in this PR). So eventually we will need to use some of this code for LOO too.
📚 Documentation preview 📚: https://arviz-stats--20.org.readthedocs.build/en/20/