Skip to content

Commit

Permalink
add lifecycle badges
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdunipace committed Feb 1, 2024
1 parent 280c6e2 commit 8dbc57f
Show file tree
Hide file tree
Showing 15 changed files with 207 additions and 3 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ importFrom(doRNG,"%dorng%")
importFrom(foreach,"%:%")
importFrom(foreach,"%do%")
importFrom(foreach,"%dopar%")
importFrom(lifecycle,deprecated)
importFrom(magrittr,"%>%")
useDynLib(WpProj, .registration = TRUE)
2 changes: 2 additions & 0 deletions R/HC.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#'
#' @return a `WpProj` object with selected covariates and their values
#'
#' @references Hahn, P. Richard and Carlos M. Carvalho. (2014) "Decoupling Shirnkage and Selection in Bayesian Linear Models: A Posterior Summary Perspective." <https://arxiv.org/pdf/1408.0464.pdf>
#'
#' @export
#'
#' @examples
Expand Down
3 changes: 2 additions & 1 deletion R/WpProj-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"_PACKAGE"

## usethis namespace: start
#' @importFrom lifecycle deprecated
#' @importFrom magrittr %>%
## usethis namespace: end
NULL
Expand All @@ -20,4 +21,4 @@ NULL
dummy_fun <- function() {
rqPen::rq.group.pen()
lifecycle::badge("experimental")
}
}
2 changes: 1 addition & 1 deletion R/WpProj.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#'
#' ## Wasserstein distances and powers
#' The Wasserstein distance is a measure of distance between two probability distributions. It is defined as:
#' \deqn{W_p(\mu,\nu) = \left(\inf_{\pi \in \Pi(\mu,\nu)} \int_{\mathbb{R}^d \times \mathbb{R}^d} \|x-y\|^p d\pi(x,y)\right)^{1/p}}.
#' \deqn{W_p(\mu,\nu) = \left(\inf_{\pi \in \Pi(\mu,\nu)} \int_{\mathbb{R}^d \times \mathbb{R}^d} \|x-y\|^p d\pi(x,y)\right)^{1/p},}
#' where \eqn{\Pi(\mu,\nu)} is the set of all joint distributions with marginals \eqn{\mu} and \eqn{\nu}. The Wasserstein distance is a generalization of the Euclidean distance, which is the case when \eqn{p=2}. In our function we have argument `power` that corresponds to the \eqn{p} of the equation above. The default `power` is `2.0` but any value greater than or equal to `1.0` is allowed. For more information, see the references.
#'
#' The particular implementation of the Wasserstein distance is as follows. If \eqn{\mu} is the original prediction from the original model, then we seek to find a new prediction \eqn{\nu} that minimizes the Wasserstein distance between the two: \eqn{\text{argmin}_\nu W_p(\mu,\nu)}.
Expand Down
3 changes: 3 additions & 0 deletions man/HC.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/WpProj.Rd

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

21 changes: 21 additions & 0 deletions man/figures/lifecycle-archived.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-defunct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-experimental.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-maturing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-questioning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-soft-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions man/figures/lifecycle-stable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-superseded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8dbc57f

Please sign in to comment.