Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
* text=auto
data/* binary
src/* text=lf
R/* text=lf
src/* text eol=lf
R/* text eol=lf
*.rda binary

4 changes: 2 additions & 2 deletions R/diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @name pareto-k-diagnostic
#' @param x An object created by [loo()] or [psis()].
#' @param threshold For `pareto_k_ids()`, `threshold` is the minimum \eqn{k}
#' value to flag (default is a sample size `S` dependend threshold
#' value to flag (default is a sample size `S` dependent threshold
#' `1 - 1 / log10(S)`). For `mcse_loo()`, if any \eqn{k} estimates are
#' greater than `threshold` the MCSE estimate is returned as `NA`
#' See **Details** for the motivation behind these defaults.
Expand Down Expand Up @@ -430,7 +430,7 @@ min_n_eff_by_k <- function(n_eff, kcut) {
#' with bigger sample size S we can achieve estimates with small
#' probability of large error, it is difficult to get accurate MCSE
#' estimates as the bias starts to dominate when k > 0.7 (see Section 3.2.3).
#' Thus the sample size dependend k-ht threshold is capped at 0.7.
#' Thus the sample size dependent k-hat threshold is capped at 0.7.
#' @param S sample size
#' @param ... unused
#' @return threshold
Expand Down
2 changes: 1 addition & 1 deletion R/importance_sampling.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ assert_importance_sampling_method_is_implemented <- function(x){
stop("Importance sampling method '",
x,
"' is not implemented. Implemented methods: '",
paste0(implemented_is_methods, collapse = "', '"),
paste0(implemented_is_methods(), collapse = "', '"),
"'")
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/loo-glossary.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @template bayesvis-reference
#'
#' @description
#' The pages provides definitions to key terms. Also see the
#' This page provides definitions of key terms. Also see the
#' [FAQ page](https://mc-stan.org/loo/articles/online-only/faq.html) on
#' the __loo__ website for answers to frequently asked questions.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/loo-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#' <https://mc-stan.org>.
#'
#' Watanabe, S. (2010). Asymptotic equivalence of Bayes cross validation and
#' widely application information criterion in singular learning theory.
#' widely applicable information criterion in singular learning theory.
#' *Journal of Machine Learning Research* **11**, 3571-3594.
#'
#' Zhang, J., and Stephens, M. A. (2009). A new and efficient estimation method
Expand Down
2 changes: 1 addition & 1 deletion R/loo_compare.psis_loo_ss_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ loo_compare.psis_loo_ss_list <- function(x, ...) {
return(comp)
}

#' Compare a reference loo object with a comaprison loo object
#' Compare a reference loo object with a comparison loo object
#' @noRd
#' @param ref_loo A named list with a `psis_loo_ss` object.
#' @param compare_loo A named list with a `psis_loo_ss` object.
Expand Down
2 changes: 1 addition & 1 deletion R/loo_model_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @export
#' @param x A list of `"psis_loo"` objects (objects returned by [loo()]) or
#' pointwise log-likelihood matrices or , one for each model. If the list
#' pointwise log-likelihood matrices, one for each model. If the list
#' elements are named the names will be used to label the models in the
#' results. Each matrix/object should have dimensions \eqn{S} by \eqn{N},
#' where \eqn{S} is the size of the posterior sample (with all chains merged)
Expand Down
2 changes: 1 addition & 1 deletion R/loo_subsample.R
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ update.psis_loo_ss <- function(object, ...,
#' @param rep If sampling with replacement is used, an observation can have
#' multiple samples and these are then repeated in the returned object if
#' `rep=TRUE` (e.g., a vector `c(1,1,2)` indicates that observation 1 has been
#' subampled two times). If `rep=FALSE` only the unique indices are returned.
#' subsampled two times). If `rep=FALSE` only the unique indices are returned.
#'
#' @return An integer vector.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/split_moment_matching.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' returns a matrix of log-posterior density values of the unconstrained
#' posterior draws passed via `upars`.
#' @param log_lik_i_upars A function that takes arguments `x`, `upars`, and `i`
#' and returns a vector of log-likeliood draws of the `i`th observation based
#' and returns a vector of log-likelihood draws of the `i`th observation based
#' on the unconstrained posterior draws passed via `upars`.
#' @param r_eff_i MCMC relative effective sample size of the `i`'th log
#' likelihood draws.
Expand Down
2 changes: 1 addition & 1 deletion R/waic.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#'
#' @references
#' Watanabe, S. (2010). Asymptotic equivalence of Bayes cross validation and
#' widely application information criterion in singular learning theory.
#' widely applicable information criterion in singular learning theory.
#' *Journal of Machine Learning Research* **11**, 3571-3594.
#'
#' @template loo-and-psis-references
Expand Down
2 changes: 1 addition & 1 deletion man/loo-glossary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/loo-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/loo_model_weights.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/loo_moment_match_split.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/obs_idx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pareto-k-diagnostic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/waic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.