Skip to contents

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).