Learn R Programming

sentopics (version 1.0.0)

plot.multi_chains: Plot the distances between topic models (chains)

Description

Plot the results of chainsDistance(x) using multidimensional scaling. See chains_distances() for details on the distance computation and stats::cmdscale() for the implementation of the multidimensional scaling.

Usage

# S3 method for multi_chains
plot(
  x,
  ...,
  method = c("euclidean", "hellinger", "cosine", "minMax", "naiveEuclidean",
    "invariantEuclidean")
)

Value

Invisibly, the coordinates of each topic model resulting from the multidimensional scaling.

Arguments

x

a valid multi_chains object, obtained through the estimation of a topic model using fit() and the argument nChains greater than 1.

...

not used

method

the method used to measure the distance between chains.

See Also

chains_distances() cmdscale()

Examples

Run this code
models <- LDA(ECB_press_conferences_tokens)
models <- fit(models, 10, nChains = 5)
plot(models)

Run the code above in your browser using DataLab