Topic Modeling 261
11.6.6 Comparison of Inference Techniques
In order to examine the similarity between the two model outputs, we can use a distance
measure using Hellinger distance to calculate how similar topics are to each other. In ad-
dition to the topicmodels package, the package clue is required to compute the distance
similarities.
clue: used for creating and analyzing cluster ensembles and includes methods for measur-
ing proximity (http://cran.r-project.org/web/packages/clue/index.html)
The following code is used to calculate the similarity between the two models (LDA
Gibbs and LDA VEM):
#COMPARISON USING HELLINGER DISTANCE:
library("topicmodels")
library("clue")
#Set the working directory
setwd("C:/Users/Documents/R/DATASET/")
#Load the models ...