Create validation tasks for labels assigned to the topics in the topic model of choice.
validateLabel(
type,
n,
text.predict = NULL,
text.name = "text",
top1.name = "top1",
top2.name = "top2",
top3.name = "top3",
labels = NULL,
labels.index = NULL,
labels.add = NULL
)
A matrix containing the validation tasks. The matrix has six value columns:
The topic index associated with the document.
The text of the document.
The first option label presented to the user.
The second option label presented to the user.
The third option label presented to the user.
The correct label for the document.
Task structures to be specified. Must be one of "LI" (Label Intrusion) and "OL" (Optimal Label).
The number of desired tasks
A data frame or matrix containing both the text and the indicator(s) of the model predicted topic(s).
variable name in `text.predict` that indicates the text
variable name in `text.predict` that indicates the top1 model predicted topic
variable name in `text.predict` that indicates the top2 model predicted topic
variable name in `text.predict` that indicates the top3 model predicted topic
The user-defined labels assigned to the topics
The topic index in correspondence with the labels, e.g., c(10, 12, 15). Must be in the same length and order with `label`.
Labels from other broad catagories. Default to NULL. Users could specify them to evaluate how well different broad categories are distinguished from one another.
#' value A matrix containing the validation tasks as described in the return section.
Users need to pick a topic model that they deem to be good and label the topics they later would like to use as measures.