Skip to contents

A topic is exclusive when its top words are rare in the other topics. stm's exclusivity (Roberts et al. 2014; Bischof and Airoldi 2012) sums, over the n_terms most probable words of the topic, their FREX score with weight frexw on exclusivity (see topic_terms()). Higher is better. Exclusivity tends to rise with K (topics get narrower) while coherence falls: the two are read together (plot_k_frontier()).

Usage

topic_exclusivity(model, n_terms = 10L, frexw = 0.7, ...)

Arguments

model

A fitted stm model (or a list with beta$logbeta[[1]] and vocab).

n_terms

Integer scalar, number of top words per topic (M in stm).

frexw

Numeric scalar in [0, 1], FREX weight of exclusivity (stm and searchK() use 0.7).

...

Not used: an argument renamed in the development version of mintR gives an error naming its replacement.

Value

A data.table with topic and exclusivity. Identical to stm::exclusivity().

References

Bischof, J. and Airoldi, E. M. (2012). Summarizing topical content with word frequency and exclusivity. Proceedings of ICML 2012, 201-208.

Roberts, M. E., Stewart, B. M., Tingley, D., Lucas, C., Leder-Luis, J., Gadarian, S. K., Albertson, B. and Rand, D. G. (2014). Structural topic models for open-ended survey responses. American Journal of Political Science, 58(4), 1064-1082. doi:10.1111/ajps.12103