Skip to content

accelerate the optimization algorithm in stacking #119

Open

Description

@yao-yl

stacking_weights() optimize the weights, which is a (K-1) simplex. Currently, it renders the constrained optimization and optimizes the first (K-1) weights in a constraint space. When the number of models is large, it is slow (e.g., more than 10 minutes for 10000 models * 100 data)

I did some experiment and found it would be much quicker if it transformed the simplex in the unconstrained space first (several seconds for the same task above). The easiest way is to call optimizing() in rstan and it does the transformation automatically. It also makes it easier if we need extra prior on weights.

@jgabry What is a good way to execute a pre-compiled stan object, without making the whole package dependent on rstan?

Activity

  1. self-assigned this
    on Aug 30, 2019
  2. jgabry commented on Sep 18, 2019

    @jgabry
    Member

    That's a good idea but I don't know how to do it without rstan (or having R call out to cmdstan). @bgoodri would know better than I would, but I don't see how loo could execute a pre-compiled stan program from R without having to do something similar to what the rstanarm package does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions