Description Usage Arguments Value References Examples
View source: R/intruderWords.R
This function validates a LDA result by presenting a mix of words from a topic and intruder words to a human user, who has to identity them.
1 2 3 4 5 6 7 8 9 10 11 12 |
beta |
A matrix of word-probabilities or frequency table for the topics (e.g. the |
byScore |
Logical: Should the score of |
numTopwords |
The number of topwords to be used for the intruder words |
numIntruder |
Intended number of intruder words. If |
numOutwords |
Integer: Number of words per topic, including the intruder words. |
noTopic |
Logical: Is |
printSolution |
tba |
oldResult |
Result object from an unfinished run of |
test |
Logical: Enables test mode |
testinput |
Input for function tests |
Object of class IntruderWords
. List of 7
result |
Matrix of 3 columns. Each row represents one topic. All values are 0 if the topic did not run before. |
beta |
Parameter of the function call |
byScore |
Parameter of the function call |
numTopwords |
Parameter of the function call |
numIntruder |
Parameter of the function call |
numOutwords |
Parameter of the function call |
noTopic |
Parameter of the function call |
Chang, Jonathan and Sean Gerrish and Wang, Chong and Jordan L. Boyd-graber and David M. Blei. Reading Tea Leaves: How Humans Interpret Topic Models. Advances in Neural Information Processing Systems, 2009.
1 2 3 4 5 6 7 8 9 | ## Not run:
data(politics)
poliClean <- cleanTexts(politics)
words10 <- makeWordlist(text=poliClean$text)
words10 <- words10$words[words10$wordtable > 10]
poliLDA <- LDAprep(text=poliClean$text, vocab=words10)
LDAresult <- LDAgen(documents=poliLDA, K=10, vocab=words10)
intruder <- intruderWords(beta=LDAresult$topics)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.