I use R in a jupyter notebook as described in this article. It work's perfectly fine. However, when I fit a GAM using the mgcv library and bam, e.g.:
dat <- gamSim(1,n=25000,dist="normal",scale=20)
bs <- "cr"; k <- 12
b <- bam(y ~ s(x0,bs=bs)+s(x1,bs=bs)+s(x2,bs=bs,k=k)+
s(x3,bs=bs), data=dat, discrete=TRUE, nthreads=4)
the jupyter notebook does not utilize multiple cpu's at once. This is problematic as work with big data. Any ideas how to fix this?