Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Score model out #46

Merged
merged 35 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1f51495
initial draft of score_model_out
elray1 Aug 20, 2024
08d0edd
Merge branch 'transform_pmf' into score_model_out
elray1 Aug 22, 2024
e101808
some partial progress on score_model_out
elray1 Aug 22, 2024
d438a7a
Merge branch 'transform_pmf' into score_model_out
elray1 Aug 22, 2024
448e830
updates to score_model_out
elray1 Aug 22, 2024
b92891a
appease the linter
elray1 Aug 22, 2024
d6a6b36
update package imports
elray1 Aug 22, 2024
c38d738
Merge branch 'transform_pmf' into score_model_out
elray1 Aug 22, 2024
28724e4
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
41c8c50
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
fd06ad7
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
fa64a8e
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
7e3ce73
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
5b8eb40
Update R/score_model_out.R
elray1 Aug 26, 2024
a68fabb
Update R/score_model_out.R
elray1 Aug 26, 2024
a6a9c3b
Update R/score_model_out.R
elray1 Aug 26, 2024
7c8e86d
Update R/score_model_out.R
elray1 Aug 26, 2024
47f29a2
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
fed85ac
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
4c6eabc
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
6c443e6
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
778be41
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
f27b164
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
2367518
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
2c740d7
Update tests/testthat/test-score_model_out.R
elray1 Aug 26, 2024
79a4828
updates from review: document lack of checks for statistical validity…
elray1 Aug 26, 2024
6e09adc
fix up comment spacing
elray1 Aug 26, 2024
5d45a2a
refactor metric validation messaging
elray1 Aug 26, 2024
ba70640
add examples for score_model_out
elray1 Aug 26, 2024
7df1803
Update R/score_model_out.R
elray1 Aug 28, 2024
a9c2795
Update R/score_model_out.R
elray1 Aug 28, 2024
18ea11a
updates to score_model_out docs
elray1 Aug 29, 2024
285b4d9
Merge branch 'score_model_out' of https://github.com/Infectious-Disea…
elray1 Aug 29, 2024
587c922
do not support lists of functions in score_model_out
elray1 Sep 11, 2024
78f7295
update docs
elray1 Sep 11, 2024
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
29 changes: 15 additions & 14 deletions R/score_model_out.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@
#'
#' @details If `metrics` is `NULL` (the default), this function chooses
#' appropriate metrics based on the `output_type` contained in the `model_out_tbl`:
#' - For `output_type == "quantile"`, we use the default metrics provided by
#' `scoringutils::metrics_quantile()`: "wis", "overprediction", "underprediction",
#' "dispersion", "bias", "interval_coverage_50", "interval_coverage_90",
#' "interval_coverage_deviation", and "ae_median"
#' - For `output_type == "pmf"` and `output_type_id_order` is `NULL` (indicating
#' that the predicted variable is a nominal variable), we use the default metrics
#' provided by `scoringutils::metrics_nominal()`, currently just "log_score"
#' - For `output_type == "median"`, we use "ae_point"
#' - For `output_type == "mean"`, we use "se_point"
#' \itemize{
#' \item For `output_type == "quantile"`, we use the default metrics provided by
#' `scoringutils::metrics_quantile()`: `r names(scoringutils::metrics_quantile())`
#' \item For `output_type == "pmf"` and `output_type_id_order` is `NULL` (indicating
#' that the predicted variable is a nominal variable), we use the default metric
#' provided by `scoringutils::metrics_nominal()`,
#' `r names(scoringutils::metrics_nominal())`
#' \item For `output_type == "median"`, we use "ae_point"
#' \item For `output_type == "mean"`, we use "se_point"
#' }
zkamvar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' Alternatively, a character vector of scoring metrics can be provided. In this
#' case, the following options are supported:
#' - `output_type == "median"` and `output_type == "median"`:
#' - "ae": absolute error of a point prediction (generally recommended for the median)
#' - "se": squared error of a point prediction (generally recommended for the mean)
#' - `output_type == "quantile"`:
#' - `output_type == "median"` and `output_type == "mean"`:
#' - "ae_point": absolute error of a point prediction (generally recommended for the median)
#' - "se_point": squared error of a point prediction (generally recommended for the mean)
#' - `output_type == "quantile"`:
#' - "ae_median": absolute error of the predictive median (i.e., the quantile at probability level 0.5)
#' - "wis": weighted interval score (WIS) of a collection of quantile predictions
#' - "overprediction": The component of WIS measuring the extent to which
Expand All @@ -42,7 +43,7 @@
#' - "interval_coverage_XX": interval coverage at the "XX" level. For example,
#' "interval_coverage_95" is the 95% interval coverage rate, which would be calculated
#' based on quantiles at the probability levels 0.025 and 0.975.
#' - `output_type == "pmf"`:
#' - `output_type == "pmf"`:
#' - "log_score": log score
#'
#' For more flexibility, it is also possible to directly provide a list of
Expand Down
15 changes: 7 additions & 8 deletions man/score_model_out.Rd

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