Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Aug 20, 2024
1 parent 4a51d67 commit 3438098
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
16 changes: 14 additions & 2 deletions R/regr_pinball.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
#' @title Pinball
#' @title Average Pinball Loss
#'
#' @details
#' The pinball loss for quantile regression.
#' The pinball loss for quantile regression is defined as \deqn{
#' \text{Average Pinball Loss} = \frac{1}{n} \sum_{i=1}^{n} w_{i}
#' \begin{cases}
#' q \cdot (t_i - r_i) & \text{if } t_i \geq r_i \\
#'(1 - q) \cdot (r_i - t_i) & \text{if } t_i < r_i
#' \end{cases}
#' }
#' where \eqn{q} is the quantile and \eqn{w_i} are normalized sample weights.
#'
#'
#' @templateVar mid pinball
#' @template regr_template
#'
#' @inheritParams regr_params
#'
#' @param alpha `numeric(1)`\cr
#' Alpha level.
#'
#' @template regr_example
#' @export
pinball = function(truth, response, sample_weights = NULL, alpha = 0.5, ...) {
Expand Down
14 changes: 12 additions & 2 deletions man/pinball.Rd

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

0 comments on commit 3438098

Please sign in to comment.