Code Monkey home page Code Monkey logo

Comments (8)

papamarkou avatar papamarkou commented on June 10, 2024

It is usual to select a distribution other than the Normal as the prior, so it would be useful to offer a wider selection of priors. Would an implementation involving a range of priors require a lot of work and would it be hard to achieve it in general?

from klara.jl.

dmbates avatar dmbates commented on June 10, 2024

Technically, penalized iteratively reweighted least squares (PIRLS) applies to cases where the logprior density of the coefficients is quadratic. In practice a quadratic approximation to the logprior could be used for non-normal priors. At times, however, trying to code up something like that may not be worth the effort compared to giving a general nonlinear optimizer an expression for the logposterior density.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

Sorry if my question is naive as this is not my field of expertise; do you mean an algorithm for nonlinear optimization, such as the ones provided by NLopt for ex? How do quadratic approximation and nonlinear optimizers compare in terms of implementation (numerical accuracy, generality and stability of results, and speed of execution)?

from klara.jl.

dmbates avatar dmbates commented on June 10, 2024

Yes, I meant using a general nonlinear optimization algorithm such as those available in the NLopt package. Speed, generality, stability, etc. will depend on the dimension of the coefficient vector and on their covariance in the posterior distribution.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

Would you have the time to code Bayes GLM with general logpriors using NLopt's optimization routines? It would take me longer than you to write this code due to my lack of familiarity with NLopt.

It may be a good idea to offer the additional functionality of using a set of priors from the Distributions package in order to avoid numerical optimization when possible - would this be a realistic possibility?

from klara.jl.

dmbates avatar dmbates commented on June 10, 2024

The coding of the prior is not the issue, it is whether the optimization of the logposterior density can be translated into an iteratively reweighted least squares calculation.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

I see what you mean. Rather than using quadratic approximations to non-Normal log-priors in order to perform PIRLS calculations, I would prefer to pass an expression for the log-prior to non-linear optimizers. What would you prefer? If you agree on the latter approach, we could always add some benchmarks to see how well it works in practice.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

This is issue is somewhat out of date, since it has been succeeded by the most recent developments towards the creation of the PGM package, which will provide an implementation of probabilistic graphical models. For this reason, I will close this ticket for now.

from klara.jl.

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.