Would like to see TimedSVI, TimedMCMC, etc (all approaches) offer a standard interface to getting samples from the learned "q" distribution
def draw_samples_from_normal_approx_posterior(docs, topics, n_samples):
'''
Args
-----
docs : 2d array (n_docs, n_vocab)
topics : 2d array (n_topics, n_vocab)
n_samples : int
Returns
--------
h_SK : 2d array (n_samples, n_topics)
Each row is an unconstrained real vector
Represents draw from q(h_n | x_n, topics)
'''
def draw_samples_from_softmax_normal_approx_posterior(docs, topics, n_samples):
'''
Args
-----
docs : 2d array (n_docs, n_vocab)
topics : 2d array (n_topics, n_vocab)
n_samples : int
Returns
-------
pi_SK : 2d array (n_samples, n_topics)
Each row is a vector on the simplex (non-negative, sums to one)
Represents draw from q(h_n | x_n, topics) that is transformed via softmax
'''