pickLabel {validateIt} | R Documentation |
Pick the optimal label from candidate labels
Description
Pick the optimal label from candidate labels
Usage
pickLabel(
n,
text.predict = NULL,
text.name = "text",
top1.name = "top1",
labels.index = NULL,
candidate.labels = NULL
)
Arguments
n |
The number of desired tasks |
text.predict |
A data frame or matrix containing both the text and the indicator(s) of the model predicted topic(s). |
text.name |
variable name in 'text.predict' that indicates the text |
top1.name |
variable name in 'text.predict' that indicates the top1 model predicted topic |
labels.index |
The topic index in correspondence with the labels, e.g., c(10, 12, 15). |
candidate.labels |
A list of vectors containing the user-defined labels assigned to the topics, Must be in the same length and order with 'labels.index'. |
Details
Users need to specify four plausible labels for each topic
Value
A matrix with n rows and 6 columns (topic, doc, opt1, opt2, opt3, optcrt) where optcrt is the correct label that was picked.
[Package validateIt version 1.2.1 Index]