LDA {ldaPrototype} | R Documentation |
LDA Object
Description
Constructor for LDA objects used in this package.
Usage
LDA(
x,
param,
assignments,
topics,
document_sums,
document_expects,
log.likelihoods
)
as.LDA(
x,
param,
assignments,
topics,
document_sums,
document_expects,
log.likelihoods
)
is.LDA(obj, verbose = FALSE)
Arguments
x |
[ |
param |
[ |
assignments |
Individual element for LDA object. |
topics |
Individual element for LDA object. |
document_sums |
Individual element for LDA object. |
document_expects |
Individual element for LDA object. |
log.likelihoods |
Individual element for LDA object. |
obj |
[ |
verbose |
[ |
Details
The functions LDA
and as.LDA
do exactly the same. If you call
LDA
on an object x
which already is of the structure of an
LDA
object (in particular a LDA
object itself),
the additional arguments param, assignments, ...
may be used to override the specific elements.
Value
[named list
] LDA object.
See Also
Other constructor functions:
as.LDABatch()
,
as.LDARep()
Other LDA functions:
LDABatch()
,
LDARep()
,
getTopics()
Examples
res = LDARep(docs = reuters_docs, vocab = reuters_vocab, n = 1, K = 10)
lda = getLDA(res)
LDA(lda)
# does not change anything
LDA(lda, assignments = NULL)
# creates a new LDA object without the assignments element
LDA(param = getParam(lda), topics = getTopics(lda))
# creates a new LDA object with elements param and topics