Created
September 30, 2015 09:52
-
-
Save mkuhn/e6f7a6b94fb31f587ce2 to your computer and use it in GitHub Desktop.
Detecting correlation between initial parameters and run time in RStan
This file contains 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