Skip to content

Commit

Permalink
base.r whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Apr 26, 2020
1 parent b942fb9 commit 3b44d1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base.r
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ if(DEBUG) {
countries <- read.csv('data/regions.csv', stringsAsFactors = FALSE)
# Read deaths data for regions
d <- read_obs_data(countries)
# Read ifr
# Read ifr
ifr.by.country <- read_ifr_data()

# Read interventions
interventions <- read_interventions(countries)

N2 <- 100 # increase if you need more forecast

processed_data <- process_covariates(countries = countries, interventions = interventions,
processed_data <- process_covariates(countries = countries, interventions = interventions,
d = d , ifr.by.country = ifr.by.country, N2 = N2)
stan_data = processed_data$stan_data
dates = processed_data$dates
Expand All @@ -80,9 +80,9 @@ if(DEBUG) {
fit = sampling(m,data=stan_data,iter=40,warmup=20,chains=2)
} else if (FULL) {
fit = sampling(m,data=stan_data,iter=1800,warmup=1000,chains=5,thin=1,control = list(adapt_delta = 0.95, max_treedepth = 15))
} else {
} else {
fit = sampling(m,data=stan_data,iter=1000,warmup=500,chains=4,thin=1,control = list(adapt_delta = 0.95, max_treedepth = 10))
}
}

out = rstan::extract(fit)
prediction = out$prediction
Expand Down

0 comments on commit 3b44d1a

Please sign in to comment.