Backend based on variational approximation via cmdstanr.

SBC_backend_cmdstan_variational(model, ..., n_retries_init = 1)



an object of class CmdStanModel (as created by cmdstanr::cmdstan_model)


other arguments passed to the $variational() method of the model. The data argument cannot be set this way as they need to be controlled by the SBC package.


number of times to retry the variational fit if the algorithm has trouble initializing (e.g. too many dropped evaluations (see, or "cannot compute ELBO using the initial variational distribution")