View source: R/component_samplers.R
sampleFastGaussian | R Documentation |
Sample from N(mu, Sigma) where Sigma = solve(crossprod(Phi) + solve(D)) and mu = Sigma*crossprod(Phi, alpha):
sampleFastGaussian(Phi, Ddiag, alpha)
Phi |
|
Ddiag |
|
alpha |
|
Draw from N(mu, Sigma), which is p x 1
, and is computed in O(n^2*p)
Assumes D is diagonal, but extensions are available
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.