Skip to content

Commit

Permalink
Fix issues with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosbosse committed Nov 1, 2024
1 parent efb41af commit 80453a2
Show file tree
Hide file tree
Showing 30 changed files with 71 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ docs
README.html
/doc/
/Meta/
scoringutils.Rcheck/*
12 changes: 8 additions & 4 deletions R/documentation-templates.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ NULL
#' \if{html}{
#' \out{<div style="text-align: left">}
#' \figure{metrics-sample.png}{options: style="width:750px;max-width:100\%;"}
#' \out{</div>}
#' \out{</div><p>}
#' Overview of required input format for sample-based forecasts
#' }
#' \if{latex}{
#' \figure{metrics-sample.png}
Expand All @@ -108,7 +109,8 @@ NULL
#' \if{html}{
#' \out{<div style="text-align: left">}
#' \figure{metrics-binary-point.png}{options: style="width:750px;max-width:100\%;"}
#' \out{</div>}
#' \out{</div><p>}
#' Overview of required input format for binary and point forecasts
#' }
#' \if{latex}{
#' \figure{metrics-binary-point.png}
Expand All @@ -122,7 +124,8 @@ NULL
#' \if{html}{
#' \out{<div style="text-align: left">}
#' \figure{metrics-quantile.png}{options: style="width:750px;max-width:100\%;"}
#' \out{</div>}
#' \out{</div><p>}
#' Overview of required input format for quantile-based forecasts
#' }
#' \if{latex}{
#' \figure{metrics-quantile.png}
Expand All @@ -136,7 +139,8 @@ NULL
#' \if{html}{
#' \out{<div style="text-align: left">}
#' \figure{metrics-nominal.png}{options: style="width:750px;max-width:100\%;"}
#' \out{</div>}
#' \out{</div><p>}
#' Overview of required input format for nominal forecasts
#' }
#' \if{latex}{
#' \figure{metrics-nominal.png}
Expand Down
2 changes: 1 addition & 1 deletion R/metrics-quantile.R
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ interpolate_median <- function(predicted, quantile_level) {
#'
#' Compute the absolute error of the median calculated as
#' \deqn{
#' |observed - median prediction|
#' |\text{observed} - \text{median prediction}|
#' }
#' The median prediction is the predicted value for which quantile_level == 0.5.
#' The function requires 0.5 to be among the quantile levels in `quantile_level`.
Expand Down
8 changes: 4 additions & 4 deletions R/metrics-sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bias_sample <- function(observed, predicted) {
#' @description
#' Absolute error of the median calculated as
#' \deqn{
#' |observed - median\_prediction|
#' |\text{observed} - \text{median prediction}|
#' }
#' where the median prediction is calculated as the median of the predictive
#' samples.
Expand Down Expand Up @@ -465,14 +465,14 @@ mad_sample <- function(observed = NULL, predicted, ...) {
#' predictions,
#'
#' \deqn{
# \bar{F}(u) = \frac{i = 1}{n} \sum_{i=1}^{n} F^{(i)}(u)
#' \bar{F}(u) = \frac{i = 1}{n} \sum_{i=1}^{n} F^{(i)}(u)
#' }
#'
#' And calculating the value at each bin between quantile \eqn{q_i} and quantile
#' \eqn{q_{i + 1}} as
#'
#' \deqn{
# \bar{F}(q_i) - \bar{F}(q_{i + 1})
#' \bar{F}(q_i) - \bar{F}(q_{i + 1})
#' }
#'
#' Alternatively, a randomised PIT can be used instead. In this case, the PIT is
Expand All @@ -481,7 +481,7 @@ mad_sample <- function(observed = NULL, predicted, ...) {
#' }
#'
#' where \eqn{v} is standard uniform and independent of \eqn{k}. The values of
#' the PIT histogram are then calculated by binning the $u_t$ values as above.
#' the PIT histogram are then calculated by binning the \eqn{u_t} values as above.
#'
#' @param quantiles A vector of quantiles between which to calculate the PIT.
#' @param integers How to handle integer forecasts (count data). This is based
Expand Down
6 changes: 3 additions & 3 deletions R/pairwise-comparisons.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#' The output of the pairwise comparisons is a set of mean score ratios,
#' relative skill scores and p-values.
#'
#' The following illustrates the pairwise comparison process:
#'
#' \if{html}{
#' \out{<div style="text-align: left">}
#' \figure{pairwise-illustration.png}{options: style="width:750px;max-width:100\%;"}
#' \out{</div>}
#' \out{</div><p>}
#' Illustration of the pairwise comparison process.
#'
#' }
#' \if{latex}{
#' \figure{pairwise-illustration.png}
Expand Down
5 changes: 3 additions & 2 deletions man/ae_median_quantile.Rd

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

5 changes: 3 additions & 2 deletions man/ae_median_sample.Rd

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

3 changes: 2 additions & 1 deletion man/bias_quantile.Rd

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

3 changes: 2 additions & 1 deletion man/bias_sample.Rd

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

3 changes: 2 additions & 1 deletion man/crps_sample.Rd

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

3 changes: 2 additions & 1 deletion man/dss_sample.Rd

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

3 changes: 2 additions & 1 deletion man/get_metrics.forecast_binary.Rd

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

3 changes: 2 additions & 1 deletion man/get_metrics.forecast_point.Rd

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

3 changes: 2 additions & 1 deletion man/get_metrics.forecast_quantile.Rd

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

3 changes: 2 additions & 1 deletion man/get_metrics.forecast_sample.Rd

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

6 changes: 3 additions & 3 deletions man/get_pairwise_comparisons.Rd

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

3 changes: 2 additions & 1 deletion man/illustration-input-metric-binary-point.Rd

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

3 changes: 2 additions & 1 deletion man/illustration-input-metric-nominal.Rd

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

3 changes: 2 additions & 1 deletion man/illustration-input-metric-quantile.Rd

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

3 changes: 2 additions & 1 deletion man/illustration-input-metric-sample.Rd

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

3 changes: 2 additions & 1 deletion man/interpolate_median.Rd

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

3 changes: 2 additions & 1 deletion man/interval_coverage.Rd

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

3 changes: 2 additions & 1 deletion man/logs_sample.Rd

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

3 changes: 2 additions & 1 deletion man/mad_sample.Rd

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

4 changes: 3 additions & 1 deletion man/pit_histogram_sample.Rd

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

3 changes: 2 additions & 1 deletion man/quantile_score.Rd

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

3 changes: 2 additions & 1 deletion man/scoring-functions-binary.Rd

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

3 changes: 2 additions & 1 deletion man/scoring-functions-nominal.Rd

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

3 changes: 2 additions & 1 deletion man/se_mean_sample.Rd

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

3 changes: 2 additions & 1 deletion man/wis.Rd

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

0 comments on commit 80453a2

Please sign in to comment.