Skip to content

Commit

Permalink
Run scaled PCA-AGHQ with s = 8 and k = 3 #58
Browse files Browse the repository at this point in the history
  • Loading branch information
athowes committed Jul 14, 2023
1 parent 8ab64ac commit 653bc03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions make/_make.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ orderly::orderly_commit(id) #' [x]
#' Scaling up the grid
run_commit_push("dev_scale-grid")

#' With PCA-AGHQ experiments
#' PCA-AGHQ experiments
run_pca_aghq <- function(k, s, sample = FALSE) {
id <- orderly::orderly_run("naomi-simple_fit", parameters = list(aghq = TRUE, k = k, s = s, grid_type = "pca", sample = sample))
orderly::orderly_commit(id)
}

#' Runs for scoping out times
#' Runs for scoping out times and calculating normalising constants
run_pca_aghq(k = 2, s = 1) #' [x]
run_pca_aghq(k = 2, s = 2) #' [x]
run_pca_aghq(k = 2, s = 3) #' [x]
Expand All @@ -74,6 +74,16 @@ run_pca_aghq(k = 5, s = 5) #' [x]

run_commit_push("naomi-simple_increase-s-k") #' [x]

#' Scaled PCA-AGHQ experiments
run_scaled_pca_aghq <- function(k, s, sample = FALSE) {
id <- orderly::orderly_run("naomi-simple_fit", parameters = list(aghq = TRUE, k = k, s = s, grid_type = "scaled_pca", sample = sample))
orderly::orderly_commit(id)
}

#' Run to first test it works, then a reasonable try at good inference
run_scaled_pca_aghq(k = 3, s = 3) #' [x]
run_scaled_pca_aghq(k = 3, s = 8, sample = TRUE) #' [ ]

#' SINLA development
run_commit_push("dev_sinla") #' Without experiments

Expand Down
2 changes: 1 addition & 1 deletion src/naomi-simple_fit/script.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ if(aghq) {
#' Add uncertainty
#' Note: can't sample when the quadrature is sparse because of negative weights
if(sample && grid_type != "sparse") {
quad <- sample_aghq(quad, M = 10)
quad <- sample_aghq(quad, M = nsample)
}

end <- Sys.time()
Expand Down

0 comments on commit 653bc03

Please sign in to comment.