Skip to content

Commit

Permalink
add explanation of linear_pool test
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Ray <elray1@users.noreply.github.com>
  • Loading branch information
lshandross and elray1 committed Aug 4, 2023
1 parent 2857f5a commit 17eb1ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/testthat/test-linear_pool.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ test_that("non-default columns are dropped from output", {


test_that("(weighted) quantiles correctly calculated", {

# The three component models provide quantiles from the distributions
# F_1 = N(-3, 1), F_2 = N(0,1), and F_3 = N(3, 1)
# The linear pool is a (weighted) mixture with cdf F(x) = \sum_m w_m F_m(x)
# We test with equal weights w_m = 1/3 and with weights w_1 = 0.25, w_2 = 0.5, w_3 = 0.25
quantile_expected <- weighted_quantile_expected <- data.frame(
stringsAsFactors = FALSE,
model_id = "hub-ensemble",
Expand Down

0 comments on commit 17eb1ec

Please sign in to comment.