Coder Social home page Coder Social logo

Comments (9)

jarioksa avatar jarioksa commented on July 17, 2024

Can you prepare a reproducible example? If not, can you reproduce this in non-parallel run?

Non-parallel runs allow better tracing: there are now 60 calls to chol in 12 functions that can give that very same error message, and we have hard time guessing which of them is involved here. Now clusterApplyLB is the last command we have written and tracing ends there from our point of view.

Yes, this can happen, and issue #45 indeed has similar features.

from hmsc.

wwhbeach avatar wwhbeach commented on July 17, 2024

I tried running a non-parallel run and got this error:

Computing chain 1
Hmsc::computeInitialParameter - initializing fixed effects with SSDM estimates
Error in chol.default(V) :
the leading minor of order 4 is not positive definite
In addition: Warning messages:
1: glm.fit: fitted probabilities numerically 0 or 1 occurred
2: glm.fit: fitted probabilities numerically 0 or 1 occurred
3: glm.fit: fitted probabilities numerically 0 or 1 occurred
4: glm.fit: fitted probabilities numerically 0 or 1 occurred
5: glm.fit: fitted probabilities numerically 0 or 1 occurred
6: glm.fit: fitted probabilities numerically 0 or 1 occurred
7: glm.fit: fitted probabilities numerically 0 or 1 occurred
8: glm.fit: algorithm did not converge
9: glm.fit: fitted probabilities numerically 0 or 1 occurred
10: glm.fit: fitted probabilities numerically 0 or 1 occurred

from hmsc.

jarioksa avatar jarioksa commented on July 17, 2024

Seems to be the "unexplained variance in species 'niches' (linear coefficients)" that cannot be inverted. It could be that failures in glm fit are a part of the problem. @ovaskain?

from hmsc.

ovaskain avatar ovaskain commented on July 17, 2024

from hmsc.

jarioksa avatar jarioksa commented on July 17, 2024

@ovaskain We have similar reports when initPar="fixed effects" was used (issue #45). Now we also have warnings from glm. These seem to be cases with complete separation or other extreme cases where binary models tend to either 0 or 1, or Poisson model to 0 which cannot be represented with the link functions, and the linear predictor tends towards minus or plus infinity. It won't go that far, but the initial values of linear predictors will be extreme, and as initial values the MCMC chains can wander off to impossible territories. I don't know if we should try to handle these cases that give a warning glm.fit: fitted probabilities numerically 0 or 1 occurred warning?

from hmsc.

ovaskain avatar ovaskain commented on July 17, 2024

from hmsc.

wwhbeach avatar wwhbeach commented on July 17, 2024

Hi @jarioksa and @ovaskain,

Thank you for your help! This seems to have fixed the issue.

from hmsc.

wwhbeach avatar wwhbeach commented on July 17, 2024

Hi again,

I've since rerun a few models that did not have any error when initPar= "fixed effects" was set and have run them without this. I've noticed that in many cases the Tjur R2 values, AUC, and WAIC results have changed quite a lot (For example, one model that originally had a mean Tjur R2 of .40 and was initially my best fitting model overall dropped to 0.32).
Any idea why this may have occurred?

from hmsc.

ovaskain avatar ovaskain commented on July 17, 2024

from hmsc.

Related Issues (20)

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.