mergeTopics {ldaPrototype} | R Documentation |
Merge LDA Topic Matrices
Description
Generic function, which collects LDA results and merges their topic matrices for a given set of vocabularies.
Usage
mergeTopics(x, vocab, progress = TRUE)
Arguments
x |
|
vocab |
[ |
progress |
[ |
Details
This function uses the function mergeRepTopics
or
mergeBatchTopics
. The topic matrices are transponed and cbinded,
so that the resulting matrix contains the counts of vocabularies/words (row wise)
in topics (column wise).
Value
[named matrix
] with the count of vocabularies (row wise) in topics (column wise).
See Also
Other merge functions:
mergeBatchTopics()
,
mergeRepTopics()
Other workflow functions:
LDARep()
,
SCLOP()
,
dendTopics()
,
getPrototype()
,
jaccardTopics()
Examples
res = LDARep(docs = reuters_docs, vocab = reuters_vocab, n = 4, K = 10, num.iterations = 30)
topics = mergeTopics(res, vocab = reuters_vocab)
dim(topics)
length(reuters_vocab)
## Not run:
res = LDABatch(docs = reuters_docs, vocab = reuters_vocab, n = 4, K = 10, num.iterations = 30)
topics = mergeTopics(res, vocab = reuters_vocab)
dim(topics)
length(reuters_vocab)
## End(Not run)