Description Usage Arguments Value
Both thetas and betas in NMF are reshaped using very similar code, so we might as well combine it explicitly in one function.
1 | reshape_samples(samples, truth, dims)
|
samples |
[array] The samples generated by STAN; e.g. obtained by fit$param. Two dimensions are for the actual matrix, the third are from sampling iterations. |
truth |
[matrix] The truth parameter values, known because we are working from a simulation. |
dims |
[character vector] The names to use for the rows and columns of the parameter matrix. |
reshaped [data.table] The melted scores, with truth along with samples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.