chainsDistances {sentopics}R Documentation

Distances between topic models (chains)

Description

Computes the distance between different estimates of a topic model. Since the estimation of a topic model is random, the results may largely differ as the process is repeated. This function allows to compute the distance between distinct realizations of the estimation process. Estimates are referred to as chains.

Usage

chainsDistances(
  x,
  method = c("euclidean", "hellinger", "cosine", "minMax", "naiveEuclidean",
    "invariantEuclidean"),
  ...
)

Arguments

x

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

method

the method used to measure the distance between chains.

...

further arguments passed to internal distance functions.

Details

The method argument determines how are computed distance.

Value

A matrix of distance between the elements of x

Author(s)

Olivier Delmarcelle

References

Tang, J., Meng, Z., Nguyen, X., Mei, Q., and Zhang, M. (2014). Understanding the Limiting Factors of Topic Modeling via Posterior Contraction Analysis. In Proceedings of the 31st International Conference on Machine Learning, 32, 90–198.

See Also

plot.multiChains() chainsScores()

Examples

model <- LDA(ECB_press_conferences_tokens)
model <- fit(model, 10, nChains = 5)
chainsDistances(model)


[Package sentopics version 0.7.3 Index]