Skip to content

Commit

Permalink
Add batch submitting of all hddm jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Liang Zhang <psychelzh@outlook.com>
  • Loading branch information
psychelzh committed Apr 24, 2024
1 parent cbb95df commit 82037b5
Show file tree
Hide file tree
Showing 24 changed files with 144 additions and 971 deletions.
4 changes: 2 additions & 2 deletions _scripts_hddm/compile_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ brm(
),
family = family,
prior = prior,
file = "data/model_diff_once",
file = "data/model_diff_camp",
chains = 0
)
## simple intercept models
Expand All @@ -103,6 +103,6 @@ brm(
),
family = family,
prior = prior,
file = "data/model_simple_once",
file = "data/model_simple_camp",
chains = 0
)
22 changes: 22 additions & 0 deletions _scripts_hddm/fit_model_tmpl.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
suppressPackageStartupMessages({{
library(tidyverse)
library(brms)
}})
source("_scripts_hddm/utils.R")
requireNamespace("bit64", quietly = TRUE)
context <- "{context}"
game_id <- "{game_id}"
effect <- "{effect}"
model_name <- if (effect == "simple") "simple" else "diff"
model <- readRDS(
fs::path("data", sprintf("model_%s_%s.rds", model_name, context))
)
cat("Processing: ", data.iquizoo::match_info(game_id, "game_name"), "\n")
cat("Context: ", context, "\n")
file_save <- fs::path(
"data-raw",
sprintf("hddm-%s", context),
sprintf("game-%s_effect-%s_wiener", game_id, effect)
)
data <- load_data(game_id, context, effect, "{key}", {rt_min}, {rt_max})
sample_model(model, data, file = file_save, iter = 1000, warmup = 500)
61 changes: 0 additions & 61 deletions _scripts_hddm/model_alert.R

This file was deleted.

53 changes: 0 additions & 53 deletions _scripts_hddm/model_antisac.R

This file was deleted.

61 changes: 0 additions & 61 deletions _scripts_hddm/model_birds_cong.R

This file was deleted.

61 changes: 0 additions & 61 deletions _scripts_hddm/model_birds_switch.R

This file was deleted.

61 changes: 0 additions & 61 deletions _scripts_hddm/model_cardsort.R

This file was deleted.

53 changes: 0 additions & 53 deletions _scripts_hddm/model_counting.R

This file was deleted.

Loading

0 comments on commit 82037b5

Please sign in to comment.