Code Monkey home page Code Monkey logo

maptpx's People

Contributors

kkdey avatar mataddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

maptpx's Issues

crashes due to L=-INF on larger datasets

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.

Update of package maptpx

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.