dt_smooth_normalize: Normalizing the document-topic matrix

dt_smooth_normalizeR Documentation

Normalizing the document-topic matrix

Description

This package assumes that doc_topics(x) is the "raw" sampled weights of topics in documents. To represent the estimated probability of observing a topic in a particular document, these values should be smoothed and normalized. This function yields a function which should in turn be applied to doc_topics(x). The idea is to minimize the possibility of confusion over whether you are operating on smoothed weights or not.

Usage

dt_smooth_normalize(m)

dt_smooth(m)

dt_normalize(m)

Arguments

m

mallet_model object

Value

a function which operates on document-topic matrix. Smoothing means adding alpha_k to document weights for topic k, normalizing means ensuring each document has total weight 1.

See Also

doc_topics, mallet.doc.topics

Examples

## Not run: dt_smooth_normalize(x)(doc_topics(x))


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.