Learn R Programming

stm (version 1.1.3)

plotModels: Plots semantic coherence and exclusivity for high likelihood models outputted from selectModel.

Description

Plots semantic coherence and exclusivity for high likelihood models. In the case of models that include content covariates, prints semantic coherence and sparsity.

Usage

plotModels(models, xlab="Semantic Coherence", ylab="Exclusivity", labels=1:length(models$runout),...)

Arguments

models
output from selectModel.
labels
labels for each model.
xlab
Character string that is x axis title. This will be semantic coherence.
ylab
Character string that is y axis title. This will be exclusivity.
...
Other plotting parameters.

Details

Each model has semantic coherence and exclusivity values associated with each topic. In the default plot function, the small colored dots are associated with a topic's semantic coherence and exclusivity. Dots with the same color as topics associated with the same model. The average semantic coherence and exclusivity is also plotted in the same color, but printed as the model number associated with the output from selectModels().

With content covariates, the model does not output exclusivity because exclusivity has been built in with the content covariates. Instead, the user should check to make sure that sparsity is high enough (typically greater than .5), and then should select a model based on semantic coherence.

Examples

Run this code


## Not run: 
# #storage is an object created by selectModel
# plotModels(storage)
# #this selects the first model from selectModel
# selected<-storage$runout[[1]]
# ## End(Not run)
 

Run the code above in your browser using DataLab