TuringLang / AdvancedVI.jl

Implementation of variational Bayes inference algorithms
http://turinglang.org/AdvancedVI.jl/
MIT License
76 stars 17 forks source link

Missing API method #32

Open sethaxen opened 2 years ago

sethaxen commented 2 years ago

The API description has the following two methods for vi:

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 commented 1 year ago

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 commented 2 months ago

@Red-Portal is this now addressed?

Red-Portal commented 2 months ago

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.)