summary.top2vec {doc2vec} | R Documentation |
Get summary information of a top2vec model
Description
Get summary information of a top2vec model. Namely the topic centers and the most similar words to a certain topic
Usage
## S3 method for class 'top2vec'
summary(
object,
type = c("similarity", "c-tfidf"),
top_n = 10,
data = object$data,
embedding_words = object$embedding$words,
embedding_docs = object$embedding$docs,
...
)
Arguments
object |
an object of class |
type |
a character string with the type of summary information to extract for the topwords. Either 'similarity' or 'c-tfidf'. The first extracts most similar words to the topic based on semantic similarity, the second by extracting the words with the highest tf-idf score for each topic |
top_n |
integer indicating to find the |
data |
a data.frame with columns 'doc_id' and 'text' representing documents.
For each topic, the function extracts the most similar documents.
And in case |
embedding_words |
a matrix of word embeddings to limit the most similar words to. Defaults to
the embedding of words from the |
embedding_docs |
a matrix of document embeddings to limit the most similar documents to. Defaults to
the embedding of words from the |
... |
not used |
Examples
# For an example, look at the documentation of ?top2vec