topics: Extract most likely topics

View source: R/seededlda.R

topicsR Documentation

Extract most likely topics

Description

topics() returns the most likely topics for documents based on the theta parameter.

Usage

topics(x, min_prob = 0, select = NULL)

Arguments

x

a LDA model fitted by textmodel_seededlda() or textmodel_lda()

min_prob

ignores topics if their probability is lower than this value.

select

returns the selected topic with the highest probability; specify by the names of columns in x$theta.

Details

Users can access the original matrix x$theta for likelihood scores; run max.col(x$theta) to obtain the same result as topics(x).

Value

Returns predicted topics as a vector.


seededlda documentation built on April 4, 2025, 2:33 a.m.

Related to topics in seededlda...