# \dontshow{
if(require(igraph) && require(BTM) && require(ggraph) &&
require(ggforce) && require(concaveman) && require(ggplot2) &&
require(data.table) && require(udpipe))
{
# }
library(igraph)
library(ggraph)
library(concaveman)
library(ggplot2)
library(BTM)
data(example_btm, package = 'textplot')
group_terms <- terms(example_btm, top_n = 3)
group_biterms <- example_btm$biterms$biterms
# \donttest{
textplot_bitermclusters(x = group_terms, biterms = group_biterms)
textplot_bitermclusters(x = group_terms, biterms = group_biterms,
title = "BTM model", subtitle = "Topics 7-15",
which = 7:15, labels = seq_len(example_btm$K))
group_terms <- terms(example_btm, top_n = 10)
textplot_bitermclusters(x = group_terms, biterms = group_biterms,
title = "BTM model", subtitle = "Topics 1-5",
which = 1:5, labels = seq_len(example_btm$K))
# }
group_terms <- terms(example_btm, top_n = 7)
topiclabels <- c("Garbage",
"Data Mining", "Gradient descent", "API's",
"Random Forests", "Stat models", "Text Mining / NLP",
"GLM / GAM / Bayesian", "Machine learning", "Variable selection",
"Regularisation techniques", "Optimisation", "Fuzzy logic",
"Classification/Regression trees", "Text frequencies",
"Neural / Deep learning", "Variable selection",
"Text file handling", "Text matching", "Topic modelling")
textplot_bitermclusters(x = group_terms, biterms = group_biterms,
title = "Biterm topic model", subtitle = "some topics",
which = c(3, 4, 5, 6, 7, 9, 12, 16, 20),
labels = topiclabels)
# \dontshow{
}
# End of main if statement running only if the required packages are installed
# }
Run the code above in your browser using DataLab