What is the appropriate iteration number in ADVI?

with logistic_model:
    mean_field = pm.fit(n=100000, method='advi')
    trace = mean_field.sample(2000)
    az.plot_trace(trace)

More specifically, I am fitting a Bayesian logistic regression with a large data set (1.1 million rows). I found that using n=100000 would be extremely slow, but I’m not sure the appropriate value of n. Is there any method to find a good value of n?

1 Like

You can check the gallery of variational inference notebooks. The quickstart is pretty introductory and covers things like tracking parameter values and convergence.