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

View source: R/topic_coherence.R

coherenceR Documentation

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

Description

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

Usage

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 July 17, 2022, 1:05 a.m.