GithubHelp home page GithubHelp logo

Comments (3)

helske avatar helske commented on July 19, 2024

Can you give a reproducible example of this? The line 329 is related to variance computation based on the importance sampling, there is likely some issue in computing the weights in the previous stages, meaning that importance sampling likely does not work in your case for some reason (poor model specification, approximation does not work, numerical issues, ...), leading for example infinite weights.

For these cases there probably should be some checks in place after the importance sampling and more informative error message.

from kfas.

jhal324 avatar jhal324 commented on July 19, 2024

Yes, sorry for the delay - I have been away. I've attached a snippet of the problem (I don't have permission to share fully).

predictProblem.zip

from kfas.

helske avatar helske commented on July 19, 2024

Thanks. There are couple of issues in your example:

First, the argument for the new data is called newdata, whereas in your script you use argument testData which is ignored as there is not such argument for the predict method.

Second, as you have NA values in the Z array, it is impossible to predict the corresponding values of y (as y_t = link_function(Z_t*alpha_t)). So that causes the issue where there are missing values in the importance samples, which then cause issues in the later computations.

While you cannot get predictions for those y values, you can still get predictions for others, if you just set NA values in Z for example to zero. That shouldn't affect the predictions of other observations as corresponding values of y are still NA.

I now added the NAOK argument anyway so things should work now as expected.

from kfas.

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.