Skip to content

Commit

Permalink
rename to yeast
Browse files Browse the repository at this point in the history
  • Loading branch information
akurennoy committed Jun 21, 2024
1 parent def6dc1 commit 3f5e50e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
32 changes: 16 additions & 16 deletions evaluate_on_real_world_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ source("methods/caa.R")
source("methods/gavi.R")
source("methods/gst.R")
source("methods/msprt.R")
source("methods/psst.R")
source("methods/sst.R")
source("methods/yeast.R")
source("methods/pyeast.R")
source("utils.R")


Expand All @@ -42,29 +42,29 @@ initialise_continuous_methods = function(robust_increment_std,
expected_num_observations,
actual_num_observations) {
return(list(
# -- SST
SST = SST$new(
"SST",
# -- YEAST
YEAST = YEAST$new(
"YEAST",
SIGNIFICANCE_LEVEL,
sum(expected_num_observations),
robust_increment_std
),
SSTnr = SST$new(
"SST-non-robust",
YEASTnr = YEAST$new(
"YEAST-non-robust",
SIGNIFICANCE_LEVEL,
sum(expected_num_observations),
non_robust_increment_std
),
# -- pSST
pSST14 = pSST$new(
"pSST14",
# -- pYEAST
pYEAST14 = pYEAST$new(
"pYEAST14",
SIGNIFICANCE_LEVEL,
cumsum(expected_num_observations),
robust_increment_std,
cumsum(actual_num_observations)
),
pSST14nr = pSST$new(
"pSST14-non-robust",
pYEAST14nr = pYEAST$new(
"pYEAST14-non-robust",
SIGNIFICANCE_LEVEL,
cumsum(expected_num_observations),
non_robust_increment_std,
Expand Down Expand Up @@ -197,12 +197,12 @@ clusterExport(
"initialise_continuous_methods",
"SequentialTest",
"Bonferroni",
"SST",
"YEAST",
"ell",
"compute_convolution",
"estimate_false_detection_rate_bound",
"compute_pSST_thresholds",
"pSST",
"compute_pYEAST_thresholds",
"pYEAST",
"GAVI",
"mSPRT",
"CAA",
Expand Down Expand Up @@ -322,7 +322,7 @@ result_dt[, `:=`(
)]

methods = c(
"SST", "pSST14", "GAVI250", "GAVI500", "GAVI750",
"YEAST", "pYEAST14", "GAVI250", "GAVI500", "GAVI750",
"mSPRT100", "mSPRT011", "mSPRT025",
"GAVI250", "GAVI500", "GAVI750",
"CAA", "Classical"
Expand Down
12 changes: 6 additions & 6 deletions methods/psst.R → methods/pyeast.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ estimate_false_detection_rate_bound = function(cumulative_num_observations_by_pe
}


compute_pSST_thresholds = function(expected_cumulative_num_observations_by_period,
compute_pYEAST_thresholds = function(expected_cumulative_num_observations_by_period,
increment_std,
significance_level) {
thresholds = (
Expand All @@ -82,8 +82,8 @@ compute_pSST_thresholds = function(expected_cumulative_num_observations_by_perio
}


pSST = R6Class(
"pSST",
pYEAST = R6Class(
"pYEAST",
inherit = SequentialTest,
public = list(
significance_level = NULL,
Expand All @@ -102,7 +102,7 @@ pSST = R6Class(
super$initialize(name)
self$significance_level = significance_level
self$increment_std = increment_std
self$thresholds = compute_pSST_thresholds(
self$thresholds = compute_pYEAST_thresholds(
expected_cumulative_num_observations_by_period,
increment_std,
significance_level
Expand Down Expand Up @@ -142,10 +142,10 @@ pSST = R6Class(

# set.seed(2024)
# print(round(measure_fdr(
# pSST$new("pSST7", 0.05, round((1:7) * (500 / 7)), 10), 10, 500, 1000
# pYEAST$new("pYEAST7", 0.05, round((1:7) * (500 / 7)), 10), 10, 500, 1000
# ), 2))
#
# set.seed(2024)
# print(round(measure_fdr(
# pSST$new("pSST14", 0.05, round((1:14) * (500 / 14)), 10), 10, 500, 1000
# pYEAST$new("pYEAST14", 0.05, round((1:14) * (500 / 14)), 10), 10, 500, 1000
# ), 2))
6 changes: 3 additions & 3 deletions methods/sst.R → methods/yeast.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ source("methods/sequential_test.R")
source("utils.R")


SST = R6Class(
"SST",
YEAST = R6Class(
"YEAST",
inherit = SequentialTest,
public = list(
significance_level = NULL,
Expand Down Expand Up @@ -32,4 +32,4 @@ SST = R6Class(


# set.seed(2024)
# print(round(measure_fdr(SST$new("SST", 0.05, 500, 10), 10, 500, 1000), 2))
# print(round(measure_fdr(YEAST$new("YEAST", 0.05, 500, 10), 10, 500, 1000), 2))
14 changes: 7 additions & 7 deletions run_simulations.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ source("methods/caa.R")
source("methods/gavi.R")
source("methods/gst.R")
source("methods/msprt.R")
source("methods/psst.R")
source("methods/sst.R")
source("methods/pyeast.R")
source("methods/yeast")
source("utils.R")


Expand All @@ -25,11 +25,11 @@ EFFECT_SIZES = c(0.0, 0.1, 0.2, 0.3, 0.4)

increment_std = sqrt(2) * EVENT_VALUE_STD
continuous_methods = list(
# -- SST
SST = SST$new("SST", SIGNIFICANCE_LEVEL, NUM_OBSERVATIONS, increment_std),
# -- pSST
pSST07 = pSST$new("pSST07", SIGNIFICANCE_LEVEL, round((1:7) * (NUM_OBSERVATIONS / 7)), increment_std),
pSST14 = pSST$new("pSST14", SIGNIFICANCE_LEVEL, round((1:14) * (
# -- YEAST
YEAST = YEAST$new("YEAST", SIGNIFICANCE_LEVEL, NUM_OBSERVATIONS, increment_std),
# -- pYEAST
pYEAST07 = pYEAST$new("pYEAST07", SIGNIFICANCE_LEVEL, round((1:7) * (NUM_OBSERVATIONS / 7)), increment_std),
pYEAST14 = pYEAST$new("pYEAST14", SIGNIFICANCE_LEVEL, round((1:14) * (
NUM_OBSERVATIONS / 14
)), increment_std),
# -- mSPRT
Expand Down

0 comments on commit 3f5e50e

Please sign in to comment.