| dendTopics | R Documentation |
Builds a dendrogram for topics based on their pairwise similarities using the
cluster algorithm hclust.
dendTopics(sims, ind, method = "complete") ## S3 method for class 'TopicDendrogram' plot(x, pruning, pruning.par, ...)
sims |
[ |
ind |
[ |
method |
[ |
x |
an R object. |
pruning |
[ |
pruning.par |
[ |
... |
additional arguments. |
The label“s colors are determined based on their Run belonging using
rainbow_hcl by default. Colors can be manipulated
using labels_colors. Analogously, the labels
themself can be manipulated using labels.
For both the function order.dendrogram is useful.
The resulting dendrogram can be plotted. In addition,
it is possible to mark a pruning state in the plot, either by color or by
separator lines (or both) setting pruning.par. For the default values
of pruning.par call the corresponding function on any
PruningSCLOP object.
[dendrogram] TopicDendrogram object
(and dendrogram object) of all considered topics.
Other plot functions:
pruneSCLOP()
Other TopicSimilarity functions:
cosineTopics(),
getSimilarity(),
jaccardTopics(),
jsTopics(),
rboTopics()
Other workflow functions:
LDARep(),
SCLOP(),
getPrototype(),
jaccardTopics(),
mergeTopics()
res = LDARep(docs = reuters_docs, vocab = reuters_vocab, n = 4, K = 10, num.iterations = 30)
topics = mergeTopics(res, vocab = reuters_vocab)
jacc = jaccardTopics(topics, atLeast = 2)
sim = getSimilarity(jacc)
dend = dendTopics(jacc)
dend2 = dendTopics(sim)
plot(dend)
plot(dendTopics(jacc, ind = c("Rep2", "Rep3")))
pruned = pruneSCLOP(dend)
plot(dend, pruning = pruned)
plot(dend, pruning = pruned, pruning.par = list(type = "color"))
plot(dend, pruning = pruned, pruning.par = list(type = "both", lty = 1, lwd = 2, col = "red"))
dend2 = dendTopics(jacc, ind = c("Rep2", "Rep3"))
plot(dend2, pruning = pruneSCLOP(dend2), pruning.par = list(lwd = 2, col = "darkgrey"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.