plotModels: Plots semantic coherence and exclusivity for high likelihood...

View source: R/plotModels.R

plotModelsR Documentation

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),
  pch = NULL,
  legend.position = "topleft",
  ...
)

Arguments

models

Output from selectModel.

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.

labels

Labels for each model.

pch

A vector of integers specifying symbol for plotting.

legend.position

The location of the legend. Can be "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center".

...

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.


bstewart/stm documentation built on Jan. 3, 2024, 6:58 p.m.