Re: [Rd] How to safely using OpenMP pragma inside a .C() function?

2011-09-01 Thread Paweł Matykiewicz
>>> .Internal(setMaxNumMathThreads(1)); .Internal(setNumMathThreads(1)); m <- >>> matrix(rnorm(81),900,900); system.time(d <- dist(m)) >>> >>>  user  system elapsed >>>  3.510   0.013   3.524 >>> >>> .Internal(setMaxNumMathThreads(5)); .Internal(setNumMathThreads(5)); m <- >>> matrix(rnorm(8100

[Rd] e1071 ver 1.5-27 and older - SVM bug report

2011-08-06 Thread Paweł Matykiewicz
Dear All: I found a problem with the SVM internal cross-validation (CV) accuracy estimation in the e1071 package. File: Rsvm.c Line: 120 Today, it is: int j = rand()%(prob->l-i); Should be: int j = i + rand()%(prob->l-i); The erroneous code doesn't shuffle objects. Instead, it "randomly" mo