6.3 Tuning number of topics

https://juliasilge.com/blog/evaluating-stm/

To compare topic models (not necessarily LDA) with different number of topic \(K\), we need first to propose metrics for comparison or topic quality. Semantic coherence s maximized when the most probable words in a given topic frequently co-occur together, which correlates human judgement of topic quality.

https://rdrr.io/cran/stm/man/exclusivity.html

It took several minutes and quite a lot computing power to run the following code. So