Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
187 views
in Technique[技术] by (71.8m points)

r - LDA, object not found

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...