Renata Diaz 10/12/2018
# define where the cache is located
db <- DBI::dbConnect(RSQLite::SQLite(), here::here("drake", "drake-cache.sqlite"))
cache <- storr::storr_dbi("datatable", "keystable", db)
ts_results <- readd(ts_results, cache = cache)
selected_ts_results <- readd(ts_select_results, cache = cache)
Find TS models that threw errors while running and remove them:
These TS models ran successfully:
Find TS models that threw errors in selection and remove them:
These TS models were selected correctly:
plot(lda_ts_result_summary$ntopics, lda_ts_result_summary$nchangepoints,
main = 'Number of changepoints by number of LDA topics',
xlab = 'Number of LDA topics', ylab = 'Number of changepoints')
plot(lda_ts_result_summary$ntimesteps, lda_ts_result_summary$nchangepoints,
main = 'Number of changepoints by length of timeseries',
xlab = 'Length of timeseries (number of timesteps)', ylab = 'Number of changepoints')
lda_ts_result_summary$filtered_topics <- paste(lda_ts_result_summary$filtered,
lda_ts_result_summary$topics,
sep= "_")
ncpts_lot <- ggplot(data = lda_ts_result_summary, aes(x = maxtopics, y = nchangepoints, color = gen_formula)) +
geom_jitter(height = 0) +
theme(legend.position = "none") +
theme_bw() +
facet_wrap(facets = filtered ~ .)
ncpts_lot
## Warning: Removed 8 rows containing missing values (geom_point).
## Warning in dir.create(here::here("analysis", "reports", "lda_ts_plots")):
## '/Users/renatadiaz/Documents/GitHub/weecology/MATSS-LDATS/analysis/reports/
## lda_ts_plots' already exists
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.