i now enter the planet of programming and my problems are basic. I am trying step by step to apply topic modelling and LDA on book analysis, knowing very little about R and trying to learn. I proceed by searching other posts, documentations, kind help from here, but i am still far from knowing things and understanding how it works.
After the extraction of top 10 terms per book (topic modelling, literature. Beginner), I give the following in order to apply LDA on books for word-topic probabilities(beta). I don′t find also infos how we set the seed
:
library(topicmodels)
library(lda)
data("books")
books <- lst(wuthering_heights, moby_dick, great_expectations)
bind_rows(books, .id = 'books') %>%
books_lda <- LDA(books, k = 3, control = list(seed = 1234))
books_lda
library(tidytext)
books_topics <- tidy(books_lda, matrix = "beta")
books_topics
I get:
In data("books") : data set ‘books’ not found, Error in x !=
vector(typeof(x), 1L) : comparison of these types is not implemented,
Error: object 'books_lda' not found, Error in tidy(books_lda, matrix =
"beta") : object 'books_lda' not found, Error: object 'books_topics'
not found
Thank you in advance
question from:
https://stackoverflow.com/questions/65932111/lda-object-not-found 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…