select_LDA: Select the best LDA model(s) for use in time series

Description Usage Arguments Value Examples

View source: R/LDA.R

Description

Select the best model(s) of interest from an LDA_set object, based on a set of user-provided functions. The functions default to choosing the model with the lowest AIC value.

Usage

1
select_LDA(LDA_models = NULL, control = list())

Arguments

LDA_models

An object of class LDA_set produced by LDA_set.

control

A list of parameters to control the running and selecting of LDA models. Values not input assume default values set by LDA_set_control. Values for running the LDAs replace defaults in (LDAcontol, see LDA (but if seed is given, it will be overwritten; use iseed instead).

Value

A reduced version of LDA_models that only includes the selected LDA model(s). The returned object is still an object of class LDA_set.

Examples

1
2
3
4
  data(rodents)
  lda_data <- rodents$document_term_table
  r_LDA <- LDA_set(lda_data, topics = 2, nseeds = 2)  
  select_LDA(r_LDA)                       

weecology/LDATS documentation built on March 28, 2020, 11:20 a.m.