| RollingLDA | R Documentation |
Performs a rolling version of Latent Dirichlet Allocation.
RollingLDA(...)
## Default S3 method:
RollingLDA(
texts,
dates,
chunks,
memory,
vocab.abs = 5L,
vocab.rel = 0,
vocab.fallback = 100L,
doc.abs = 0L,
memory.fallback = 0L,
init,
type = c("ldaprototype", "lda"),
id,
...
)
... |
additional arguments passed to |
texts |
[ |
dates |
[ |
chunks |
[ |
memory |
[ |
vocab.abs |
[ |
vocab.rel |
[0,1] |
vocab.fallback |
[ |
doc.abs |
[ |
memory.fallback |
[ |
init |
[ |
type |
[ |
id |
[ |
The function first computes a initial LDA model (using
LDARep or LDAPrototype).
Afterwards it models temporal chunks of texts with a specified memory for
initialization of each model chunk.
The function returns a RollingLDA object. You can receive results and
all other elements of this object with getter functions (see getChunks).
[named list] with entries
id[character(1)] See above.
ldaLDA object of the fitted RollingLDA.
docs[named list] with modeled texts in a preprocessed format.
See LDAprep.
dates[named Date] with dates of the modeled texts.
vocab[character] with the vocabularies considered
for modeling.
chunks[data.table] with specifications for each
model chunk.
param[named list] with parameter specifications for
vocab.abs [integer(1)], vocab.rel [0,1],
vocab.fallback [integer(1)] and
doc.abs [integer(1)]. See above for explanation.
Other RollingLDA functions:
as.RollingLDA(),
getChunks(),
updateRollingLDA()
roll_lda = RollingLDA(texts = economy_texts,
dates = economy_dates,
chunks = "quarter",
memory = "3 quarter",
init = "2008-07-03",
K = 10,
type = "lda")
roll_lda
getChunks(roll_lda)
getLDA(roll_lda)
roll_proto = RollingLDA(texts = economy_texts,
dates = economy_dates,
chunks = "quarter",
memory = "3 quarter",
init = "2007-07-03",
K = 10,
n = 12,
pm.backend = "socket",
ncpus = 2)
roll_proto
getChunks(roll_proto)
getLDA(roll_proto)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.