Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calcscore

Calculate Score Words


Description

A primarily internal function for calculating words according to the score metric. We expect most users will use labelTopics instead.

Usage

calcscore(logbeta)

Arguments

logbeta

a K by V matrix containing the log probabilities of seeing word v conditional on topic k

Details

Score is a metric which we include because it is used effectively in the lda package by Jonathan Chang. It is calculated as:

β_{v, k} (\log β_{w,k} - 1 / K ∑_{k'} \log β_{v,k'})

References

Jonathan Chang (2015). lda: Collapsed Gibbs Sampling Methods for Topic Models. R package version 1.4.2. https://CRAN.R-project.org/package=lda

See Also


stm

Estimation of the Structural Topic Model

v1.3.6
MIT + file LICENSE
Authors
Margaret Roberts [aut], Brandon Stewart [aut, cre], Dustin Tingley [aut], Kenneth Benoit [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.