Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use multi cores processing to run glm function faster

I'm a bit new to r and I would like to use a package that allows multi cores processing in order to run glm function faster.I wonder If there is a syntax that I can use for this matter. Here is an example glm model that I wrote, can I add a parameter that will use multi cores ?

g<-glm(IsChurn~.,data=dat,family='binomial')

Thanks.

like image 484
mql4beginner Avatar asked May 11 '14 15:05

mql4beginner


1 Answers

A new options, is my package parglm. You can find a comparisons of computation times here. A plot of the computation time versus number of used cores on a 18 core machine in the vignette for two of the implemented methods is given below

enter image description here

The dashed line is the computation time from glm and the dotted line is the computation time from speedglm. The method with the open circles compute the Fisher information and then solves the normal equation as in speedglm. The full circles makes a QR decomposition as glm. The former is faster but less stable.

I have added some more comments on the QR method in the answer here on a related question.

like image 123
Benjamin Christoffersen Avatar answered Sep 30 '22 17:09

Benjamin Christoffersen