Releases: stan-dev/loo
loo v2.1.0
See release notes below or at mc-stan.org/loo/news.
Installation
Install from CRAN:
install.packages("loo")Install from GitHub:
devtools::install_github("stan-dev/loo", ref = "v2.1.0") Release notes
-
New function
loo_compare()for model comparison that will eventually replace
the existingcompare()function. (#93) -
New vignette on LOO for non-factorizable joint Gaussian models. (#75)
-
New vignette on "leave-future-out" cross-validation for time series models. (#90)
-
New glossary page (use
help("loo-glossary")) with definitions of key terms. (#81) -
New
se_diffcolumn in model comparison results. (#78) -
Improved stability of
psis()whenlog_ratiosare very small. (#74) -
Allow
r_eff=NAto suppress warning when specifyingr_effis not applicable
(i.e., draws not from MCMC). (#72) -
Update effective sample size calculations to match RStan's version. (#85)
-
Naming of k-fold helper functions now matches scikit-learn. (#96)
loo v2.0.0
See release notes below or at mc-stan.org/loo/news.
Installation
Note: If you are an rstanarm user don't update loo without also installing rstanarm v2.17.4. For brms users make sure to install brms v2.2.0.
Install from CRAN:
install.packages("loo")Install from GitHub:
# note: setting build_vignettes=FALSE will be faster and you can always access
# the vignettes at mc-stan.org/loo/articles/
devtools::install_github("stan-dev/loo", ref = "v2.0.0", build_vignettes = TRUE) Release notes
This is a major release with many changes. Whenever possible we have opted to
deprecate rather than remove old functionality, but it is possible that old code
that accesses elements inside loo objects by position rather than name may
error.
-
New package documentation website http://mc-stan.org/loo/ with new vignettes,
function reference, news. -
Updated existing vignette and added two new vignettes demonstrating how to use
the package. -
New function
psis()replacespsislw()(now deprecated). This version
implements the improvements to the PSIS algorithm described in the latest
version of https://arxiv.org/abs/1507.02646. Additional diagnostic
information is now also provided, including PSIS effective sample sizes. -
New
weights()method for extracting smoothed weights from apsisobject.
Argumentslogandnormalizecontrol whether the weights are returned on the
log scale and whether they are normalized. -
Updated the interface for the
loo()methods to integrate nicely with the new
PSIS algorithm. Methods for log-likelihood arrays, matrices, and functions
are provided. Several arguments have changed, particularly for the
loo.functionmethod. The documentation athelp("loo")has been updated to
describe the new behavior. -
The structure of the objects returned by the
loo()function has also changed
slightly, as described in the Value section athelp("loo", package = "loo"). -
New function
loo_model_weights()computes weights for model averaging as
described in https://arxiv.org/abs/1704.02030. Implemented methods include
stacking of predictive distributions, pseudo-BMA weighting or pseudo-BMA+
weighting with the Bayesian bootstrap. -
Setting
options(loo.cores=...)is now deprecated in favor of
options(mc.cores=...). For now, if both theloo.coresandmc.coresoptions
have been set, preference will be given toloo.coresuntil it is removed in a
future release. (thanks to @cfhammill) -
New functions
example_loglik_array()andexample_loglik_matrix()that
provide objects to use in examples and tests. -
When comparing more than two models with
compare(), the first column of the
output is now theelpddifference from the model in the first row. -
New helper functions for splitting observations for K-fold CV:
kfold_split_random(),kfold_split_balanced(),kfold_split_stratified().
Additional helper functions for implementing K-fold CV will be included in
future releases.
loo v1.1.0
loo 1.1.0
- Introduce the
E_loofunction. This can be used to compute weighted expectations (means, variances, quantiles) using the smoothed weights obtained from PSIS.
This release is now available from CRAN, although it will have to be installed from source until binaries have been built (typically a few days):
install.packages("loo", type = "source")loo v1.0.0
loo 1.0.0
pareto_k_tableandpareto_k_idsconvenience functions for quickly identifying problematic observations- pareto k values now grouped into
(-Inf, 0.5],(0.5, 0.7],(0.7, 1],
(1, Inf)(didn't used to include 0.7) - warning messages are now issued by
psislwinstead ofprint.loo print.looshows a table of pareto k estimates (if any k > 0.7)- Add argument to
compareto allow loo objects to be provided in a list rather than in'...' - Update references to point to published paper
loo v0.1.6
loo v0.1.5
Notes:
- Add warnings if any p_waic estimates are greather than 0.4
- Improve line coverage of tests to 100%
- Update references in documentation
- Remove model weights from
compare.
In previous versions of loo model
weights were also reported bycompare. We have removed the weights because
they were based only on the point estimate of the elpd values ignoring the
uncertainty. We are currently working on something similar to these weights that
also accounts for uncertainty, which will be included in future versions of
loo.
loo v0.1.4
This update makes it easier for other package authors using loo to write
tests that involve running the loo function. It also includes minor bug
fixes and additional unit tests. Highlights:
- Don't call functions from parallel package if
cores=1. - Return entire vector/matrix of smoothed weights rather than a summary statistic when
psislwfunction is called in an interactive session. - Test coverage > 80%
loo v0.1.3
This update provides several important improvements, most notably an alternative
method for specifying the pointwise log-likelihood that reduces memory usage
and allows for loo to be used with larger datasets.
- S3 generics and
matrixandfunctionmethods for bothlooandwaic.
The matrix method provide the same functionality as in previous versions of
loo (taking a log-likelihood matrix as the input). The function method
allows the user to provide a function for computing the log-likelihood from
the data and posterior draws (which are also provided by the user). The function
method is less memory intensive and should make it possible to use loo for
models fit to larger amounts of data than before. - Separate
plotandprintmethods.plotalso provideslabel_points
argument, which, ifTRUE, will label any Paretokpoints greater than
1/2 by the index number of the corresponding observation. The plot method
also now warns aboutInf/NA/NaNvalues ofkthat are not shown in
the plot. comparenow returns model weights and accepts more than two inputs.- Allow setting number of cores using
options(loo.cores = NUMBER).
loo v0.1.2
Install from CRAN
install.packages("loo")
Install from GitHub
devtools::install_github("jgabry/loo") # requires devtools package
loo v0.1.1
Update README.md