Run a vectorised analysis of the replicates in chunks
Source:R/vectorised_conjugate_inference.R
analyse_in_replicate_chunks.RdA vectorised analysis holds several n_replicates x n_components matrices at once, which for a mixture of hundreds of
components and ten thousand replicates reaches gigabytes per worker, and
limits how many workers a machine can run. Every replicate is analysed on
its own, so the analysis can run on consecutive chunks of replicates and the
results be concatenated, with the same result and a peak memory bounded by
the chunk.
Arguments
- samples
Data frame of generated replicates, one row each.
- analyse
Function of a chunk of
samplesreturning the list thatvectorised_normal_mixture_simulation()returns.- chunk_size
Number of replicates per chunk.