Created
September 30, 2015 09:52
Detecting correlation between initial parameters and run time in RStan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(purrr) | |
runtimes <- get_elapsed_time(fit)[,2] | |
inits <- get_inits(fit) | |
## traditional conversion to a matrix | |
# m.init <- do.call(rbind, lapply(inits, function(l) do.call(c, l))) | |
## using purrr | |
m.init <- inits %>% map(lift_dl(c)) %>% map_call(rbind) | |
time_cor <- cor(m.init, runtimes) | |
time_cor <- time_cor[ order(time_cor), ] | |
head(time_cor, n=25) | |
tail(time_cor, n=25) | |
# plot(m.init[,"parameter_name"], runtimes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment