[R] *** caught segfault *** when using impute.knn (impute package)

Peter Langfelder peter.langfelder at gmail.com
Wed Mar 2 17:07:55 CET 2011


On Wed, Mar 2, 2011 at 6:31 AM, Bettina Kulle Andreassen
<b.k.andreassen at medisin.uio.no> wrote:
> hi,
>
> i am getting an error when calling the impute.knn
> function (see the screenshot below).
> what is the problem here and how can it be solved?
>
>
> screenshot:
>
> ##################
>  *** caught segfault ***
> address 0x513c7b84, cause 'memory not mapped'
>
> Traceback:
>  1: .Fortran("knnimp", x, ximp = x, p, n, imiss = imiss, irmiss,
> as.integer(k), double(p), double(n), integer(p), integer(n),     PACKAGE =
> "impute")
>  2: knnimp.internal(x, k, imiss, irmiss, p, n, maxp = maxp)
>  3: knnimp(x, k, maxmiss = rowmax, maxp = maxp)
>  4: impute.knn(dummy0, k)
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
>
> ##################
>
> thanks for your help in advance!
>

I've been seeing the same problem for some time. It tends to happen
when one of the clusters the function splits the data into has the
same size as k. Make sure k is smaller than your data size, too. Try
moving k a little bit, for example set k=9 or k=11 (the default is 10)
and see if the crash goes away. I am CCing the package maintainer.

HTH,

Peter

> Bettina Kulle Andreassen
>
> University of Oslo
>
> Department of Biostatistics
>
> and
>
> Institute for Epi-Gen (Faculty Division Ahus)
>
> tel:
> +47 22851193
> +47 67963923
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list