combMass: Combine the mass of words with the same root

View source: R/combMass.R

combMassR Documentation

Combine the mass of words with the same root

Description

Combine the mass of words with the same root

Usage

combMass(mod = NULL, vocab = NULL, beta = NULL)

Arguments

mod

Fitted structural topic models.

vocab

A character vector specifying the words in the corpus. Usually, it can be found in topic model output.

beta

A matrix of word probabilities for each topic. Each row represents a topic and each column represents a word. Note this should not be in the logged form.

Details

Use as a preparing step for validating unstemmed topic models.

Value

A list with two elements:

newvocab

A matrix of new vocabulary. Each row represents a topic and each column represents a unique stemmed word.

newbeta

A matrix of new beta. Each row represents a topic and each column represents the sum of the probabilities of the words with the same root.


validateIt documentation built on May 31, 2023, 5:22 p.m.