coherence: Helper function for calculating coherence for a single...

Description Usage Arguments Value

View source: R/topic_coherence.R

Description

Helper function for calculating coherence for a single topic's worth of terms

Usage

1
coherence(dtm_data, top_terms, smoothing_beta)

Arguments

dtm_data

a document-term matrix of token counts coercible to simple_triplet_matrix

top_terms

a character vector of the top terms for a given topic

smoothing_beta

a numeric indicating the value to use to smooth the document frequencies in order avoid log zero issues, the default is 1

Value

a numeric indicating coherence for the topic


topicdoc documentation built on Oct. 30, 2019, 11:26 a.m.