analysis/reports/ts_report.md

TS on LDA report

Renata Diaz 10/12/2018

Read in the results

# 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)

Errors

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:

Community-level results

Cross-community results

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')

Detailed model results

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



weecology/MATSS-LDATS documentation built on Nov. 5, 2019, 12:07 p.m.