Closed peterraphael closed 3 years ago
Thank you very much for your feedback. You are completely right, gridsearch should be available in parallel, computations are completely independent and thus perfect for parallel computing. In addition, as you mention, it should let users run much more replicates, which is always good and recommended with latent class models. This is actually something we do in our own works but we had not provided it yet on the released version. We will take into account your advice and add this soon. Thanks again! Cécile
Great, I am looking forward to it.
Hi, I am happy to tell you that the new version of lcmm is now on cran : version 1.9.1. It now includes the gridsearch with parallel computations as you suggested. Thanks! You will see, it also includes the estimation of latent class models for multiple longitudinal markers in mpjlcmm function. Best Cécile
Dear Cécile, dear Viviane,
The
lcmm
package is great. Thanks for your work!Lately, I have been working a lot with
jointlcmm
models. Fitting more complex joint models is computationally very expensive, and performing a grid search can take much time. As I get impatient easily, I want to suggest a parallelized version ofgridsearch
, which can reduce the waiting time quite a bit (depending on the available hardware).The proposed
gridsearch.parallel
function call does not differ from that ofgridsearch
except for thecl
argument expecting a cluster created usingparallel::makeCluster
.Evaluation
Considering the example form the
gridsearch
man page, but using 250 replications instead of 50. The execution time halved using all cores on a machine with four physical cores (average increase in speed by factor 2.1, 1.9, and 1.6 using four, three or two cores, compared to the non-parallelizedgridsearch
; see below).As there is some overhead for the initialization of clusters, I would expect the relative increase in speed for computational more expensive models to be higher than for the presented example.
Best, Raphael