topic.coherence: topic.coherence

Description Usage Arguments Value

View source: R/topic.coherence.R

Description

Calculates topic coherence for each topic in a topic model. Uses the implementation put forward by Mimno et al. (2011) - Note, this directly uses the code in the package 'SpeedyReader'

Usage

1
topic.coherence(ldaOut, dtm, n.terms)

Arguments

ldaOut

fitted topic model

dtm

document term matrix for the fitted topic model

n.terms

The number of terms in each topic to calculate topic coherence on

Value

vector of topic coherence scores (same length as the number of topics in the model)


bvidgen/RPackage documentation built on April 18, 2018, 8:26 p.m.