quentingronau / bridgesampling

R package for bridge sampling
32 stars 16 forks source link

Parallelize `bf()` #34

Closed JeffreyRStevens closed 1 year ago

JeffreyRStevens commented 1 year ago

Does the bf() function have a way to parallelize the computations across repetitions? Or should I run bf() repeatedly using external parallelization? Basically, I'm looking for any way to speed up processing for a very long processing time.

quentingronau commented 1 year ago

Hi Jeffrey,

The bf function does not, but the bridge_sampler function has. Once the log marginal likelihoods have been computed via bridge_sampler, using bf should be very quick.

Cheers, Quentin

JeffreyRStevens commented 1 year ago

Many thanks for your reply, @quentingronau. That clarifies where the action is. When using the bridge_sampler() function, I see that I can specify the number of cores to parallelize the processing. I have a few questions, if you don't mind.

System specs: R version 4.2.2; bridgesampling version 1.1-2; Ubuntu 22.04.2