0

I am running this piece of code:

rf.mod <- caret::train(as.factor(traincpdf$lab) ~ ., method="rf",
            preProcess = "pca", data=traincpdf, verbose = FALSE)

And I obtained the following:

 *** caught segfault ***
address 0x110, cause 'memory not mapped'

  *** caught segfault ***
 address 0x110, cause 'memory not mapped'

  *** caught segfault ***
 address 0x110, cause 'memory not mapped'

  *** caught segfault ***
 address 0x110, cause 'memory not mapped'

 Traceback:
  1: La.svd(x, nu, nv)
  2: svd(x, nu = 0)
  3: prcomp.default(x[, method$pca, drop = FALSE], scale = TRUE, retx = FALSE)
  4: prcomp(x[, method$pca, drop = FALSE], scale = TRUE, retx = FALSE)
  5: preProcess.default(thresh = 0.95, k = 5, method = "pca", x = c(0.86275, 0.90196, 0.90196, 0.87059, 1, 0.78431, 0.78431, 0.85359, 0.85359, 1, 1, 1, 0.71503, 1, 1, 1, 1, 1, 0.95948, 0.94379, 0.93464, 0.94248, 0.95425, 0.93072, 0.94641, 0.94641, 0.94641, 0.9634, 0.9634, 1, 1, 1, 1, 0.79281, 0.79281, 1, 1, 1, 0.90327, 1, 1, 1, 1, 1, 1, 1, 0.86667, 0.6549, 0.6902, 0.91242, 0.91242, 0.91765, 1, 1, 1, 1, 1, 1, 1, 0.97386, 0.97386, 0.97386, 1, 1, 0.078431, 0.078431, 1, 0.75033, 0.78039, 1, 1, 0.84837, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.20131, 1, 1, 1, 1, 0.16601, 0.16601, 0.96993, 1, 0.99216, 0.99216, 0.99216, 0.94379, 0.94379, 0.95686, 0.96732, 1, 1, 1, 1, 1, 0.96863, 0.96863, 0.96863, 
 Traceback:
 0.96863, 0.96863, 1, 
 Traceback:

 Traceback:
  1:  1:  1: 0.9281, 0.9281, 0.9281, 0.95425, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, La.svd(x, nu, nv)La.svd(x, nu, nv)La.svd(x, nu, nv)

 ...

I found this post where they suggest to remove and re-install all packages, which seems a little drastic to me.

All those commands La.svd(x, nu, nv), prcomp run perfectly on their own and the caret command itself runs perfectly without the pca option, i.e. :

rf.mod <- caret::train(as.factor(traincpdf$lab) ~ ., method="rf",
                       data=traincpdf, verbose = FALSE)

Anyone has any idea on how to solve this

 *** caught segfault ***
 address 0x110, cause 'memory not mapped'

error

Thanks

Community
  • 1
  • 1
Javier
  • 1,530
  • 4
  • 21
  • 48
  • the drastic solution is four lines of code which includes getting all of your current packages back? – rawr Mar 09 '16 at 15:49
  • @rawr: well, yeah, removing all packages sounded to me like "drastic" given how many I have, but anyway, I will give it a go if that is the way... – Javier Mar 09 '16 at 16:06
  • well I'm not sure exactly what your specific problem is, but it should only take a few minutes and solve your issue? – rawr Mar 09 '16 at 16:07
  • I had exactly the same problem when running sample code from chapter 10 "Sampling" of the caret documentation. Reinstalling packages could not solve it. – Freitags May 29 '17 at 13:09

0 Answers0