topic_cooccurrence: Calculate topic co-occurrence from text2vec model

View source: R/topic_cooccurrence.R

topic_cooccurrenceR Documentation

Calculate topic co-occurrence from text2vec model

Description

Calculate topic co-occurrence from text2vec model

Usage

topic_cooccurrence(x, n_top_words = 5, term_order_lambda = 1,
  diag_to_zero = TRUE, n_top_topics = 10)

Arguments

x

A named list containing a fitted text2vec LDA model and the document topic distribution. Names need to be: list(model = ..., doc_topic_distr = ...). The first element should be the lda model object and the second the topic distribution to be extraced from the former via $doc_topic_distr.

n_top_words

Number of top words to of each topic to be used as topic label. Passed to get_top_words.

term_order_lambda

Lambda for re-ordering the extracted top terms. Passed to get_top_words.

diag_to_zero

Shall the diagonal of the output be set to zero, i.e., should the self-co-occurrence (which is the occurrence of a topic of all docs) be neglected? By default TRUE.#'

Value

An symmetric matrix showing the co-occurrence of topics in documents.


manuelbickel/textility documentation built on Nov. 25, 2022, 9:07 p.m.