taddylab / maptpx Goto Github PK
View Code? Open in Web Editor NEWmap estimation of topic models
map estimation of topic models
we're running maptpx on some larger datasets. When we do this we get infinite L sometimes in this line:
if(is.infinite(L)){ L <- sum( (log(Q0)*col_sums(X))[Q0>0] )}
but the problem is that the sum() returns NA.
This then causes a crash later at
if(QNup$L < L){
because L is NA.
We tried to fix this by:
i) comment out the if(is.infinite(L)) line
ii) comment out reldif # reldif <- dif/L
iii) change tolerance check to dif instead of reldif: if(abs(dif) < tol){
This seemed to work except that it crashed (presumably after 1000 iterations) at
if(((iter+1)%%1000)==0){
cat(sprintf("p %d iter %d diff %g\n",
nrow(theta), iter+1,round(diff)))
due to the bug round(diff) should be round(dif).
We've fixed that and are now re-running - currently waiting for results.
What do you think? I think that the tolerance check should be on the difference in loglikelihood anyway - the relative change in loglikelihood is nonsense (at least so I always tell my students!)
But maybe there is also something to understand about why that sum() produces NA?
We can prepare a formal pull request with these changes if you like.
Hello,
I would like to know if there is a way of using the function "topics" from the "maptpx" package anymore considering that the package is not usable now on R version 4.0.0 because of lack of updates. Could you re orientate me towards other solutions ?
Thanks for your kind help.
Best regards,
Pierre
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.