Generates function that samples F from a flash fit object. The columns of F are sampled independently from their marginal posteriors (conditional on L being fixed at its expectation).

flash_f_sampler(data, f, kset = NULL, ebnm_fn = ebnm_pn)

Arguments

data

a flash data object

f

a flash fit object

kset

the indices of factor/loadings to include when sampling LF (defaults to all)

ebnm_fn

function used to solve the Empirical Bayes Normal Means problem

Value

A function that takes a single parameter nsamp, the number of samples of F to be produced by the sampler. This sampler returns a list of matrices.