Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing API method #32

Open
sethaxen opened this issue Oct 26, 2021 · 3 comments
Open

Missing API method #32

sethaxen opened this issue Oct 26, 2021 · 3 comments

Comments

@sethaxen
Copy link
Member

The API description has the following two methods for vi:

  • vi(model, alg)
  • vi(model, alg, q::VariationalPosterior, θ)

The first method is needed when the algorithm only supports one variational family (e.g. Pathfinder). However, there's no way to provide θ as in the second method. It would be useful if the API included vi(model, alg, θ)

@Red-Portal
Copy link
Member

Red-Portal commented Jun 12, 2023

HI @sethaxen is this still a necessity? I'm currently planning to provide the following two interfaces as part of #45 :

optimize(objective, q, n_iter)
optimize(objective, restructure, λ, n_iter)

What else do you think is needed?

@yebai
Copy link
Member

yebai commented Jun 13, 2024

@Red-Portal is this now addressed?

@Red-Portal
Copy link
Member

Red-Portal commented Jun 21, 2024

The new interface for v0.3.0 is now

optimize(problem, objective, q_init, max_iter, objargs...; kwargs...)

and I think one could treat q_init as just $\theta$? I think it should just work. Though, to be honest, handing just $\theta$ without additional information about what distribution it represents doesn't make sense in the VI context. (And to be honest, Pathfinder IMO is not really a VI algorithm.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants