ldatuning | LDA models parameters | Topic Modeling library
kandi X-RAY | ldatuning Summary
kandi X-RAY | ldatuning Summary
This package uses some metrics to find optimal number of topics for Latent Dirichlet allocation (LDA) models. For more complete explanation see vignette.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ldatuning
ldatuning Key Features
ldatuning Examples and Code Snippets
Community Discussions
Trending Discussions on ldatuning
QUESTION
I try to find the optimal number of topics in the LDA algorithm for my database. For this purpose I try to use the package "ldatuning". After the implementation of the LDA algorithm with the "gibbs" method I try to use the function:
Griffiths2004(models, control) The arguments should be: models An object of class "LDA control A named list of the control parameters for estimation or an object of class "LDAcontrol".
I used it like that:
...ANSWER
Answered 2021-Jun-15 at 11:13The problem probably lies in how you pass the control parameter list to the Griffiths2004 function.
In the Griffiths2004 function, the parameters are addressed as in a list using control$param
. However, lda_5@control
returns an S4 object where the parameters should be addressed with control@param
. (An S4 object is an advanced class in R, but the only important difference for this application is, that we address objects in these lists with @ instead of $)
You can see that lda@control
is an S4 object when calling it:
QUESTION
This is the outcome error and I can tell this is because there is at least one document without some term, but I don't get why and how I can solve it.
...ANSWER
Answered 2019-Oct-27 at 11:05ldatuning
expects input dtm
matrix in a different format (format from topicmodels
package). You need to convert dtm
(sparse matrix from Matrix package) to a format which ldatuning
can understand
QUESTION
Hi I'm working with the last example in this tutorial: Topics proportions over time. https://tm4ss.github.io/docs/Tutorial_6_Topic_Models.html
I run it for my data with this code
...ANSWER
Answered 2019-Mar-07 at 19:03I am not sure what you want to achieve with the command
QUESTION
I'm doing some work in R that depends on the package ldatuning
. I got the package set up and a script running on my local windows machine. It looks like it will take awhile to run, so I spun up a Linux VM (Ubuntu 16.06) in the cloud to run the script. I tried to set up the environment in R with install.packages('ldatuning')
, but had a lot of errors. After some digging, I realized that some of the R packages that ldatuning
depends on also had dependencies on Linux libraries. In fact there were three different packages that depended on a Linux library. I had to search on stack overflow in each case, and always found brief answers like this one or this one. So how did the people that answered those questions know which libraries to install? I understand that often there are R packages that depend directly on Linux libraries, but how could I know the exact Linux libraries I would need ahead of time? For example, for the R library gmp
, my guess would be to try sudo apt-get install gmp
, but that doesn't work - it is sudo apt-get install libgmp3-dev
. How could I find out that the R package gmp
depends on libgmp3-dev
?
ANSWER
Answered 2019-Feb-02 at 02:02Unfortunately there's not yet a great, complete, and uniform way to deal with this. A great project toward that end is https://github.com/r-hub/sysreqsdb, which you should definitely check out, and may help you.
Also, often when you have an error installing a package due to an unmet system dependency, part of the installation output will tell you how to solve the problem; for example, here's part of the output from a failed installation of pdftools
:
QUESTION
I have been trying out different ways of determining topic frequency in LDA (in R) and have stumbled across the very useful-looking package ldatuning but cannot really figure out the control parameter and particularly the example value for seed.
Here is the example code from the website:
...ANSWER
Answered 2017-Apr-02 at 00:05seed: Object of class "integer"; used to set the seed in the external code for VEM estimation and to call set.seed for Gibbs sampling. For Gibbs sampling it can also be set to NA (default) to avoid changing the seed of the random number generator in the model fitting call.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ldatuning
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page