Displaying 3 results from an estimated 3 matches for "do_cov".
2006 Oct 17
0
[R] performance reflections
...6, 2006, at 11:29 AM, Ren? J.V. Bertin wrote:
> Anyway, it has nothing to do with the G4 optimisations, as the
> generic 2.4.0 on CRAN also shows the same performance drop.
>
Thanks for the example. I think I have a clarification on this. On a
higher level it's happening in "do_cov", but the underlying issue is
the use of "long double" computations. First the results:
The timings I get (on 2xG5 2.7GHz) are:
gcc3: 0.8s
gcc4: 4.5s (dynamic libgcc)
gcc4: 4.2s (static libgcc)
Basically any calls that use long double will be affected:
qadd: 4.5s (gcc3 opt), 6.7...
2004 Nov 02
0
how to call function in ../src/main
...cy;
/* compute correlations if PRIMVAL(op) == 0,
covariances if PRIMVAL(op) != 0 */
cor = 0;
ansmat = 0;
ncx = 1;
ncy = 1;
pair = TRUE;
kendall = FALSE;
cov_pairwise2(n, ncx, ncy, x, y, ans,
&sd_0, cor, kendall);
}
replace
SEXP do_cov(SEXP call, SEXP op, SEXP args, SEXP env)
{
...
}
and we have cor.i which has
/* File : cor.i */
%module cor
extern cor ( int n, double *x, double *y, double *ans );
We have
cor: cor.c
swig -perl5 cor.i
gcc -c cor.c cor_wrap.c -I. -I../../src/include -I/usr/local/include
-I$...
2009 Dec 13
2
O(N log N) Kendall Tau
I've noticed that the implementation of Kendall's Tau in R is O(N^2).
The following reference describes how it can be done in O(N log N):
A Computer Method for Calculating Kendall's Tau with Ungrouped Data
William R. Knight
Journal of the American Statistical Association, Vol. 61, No. 314, Part
1 (Jun., 1966), pp. 436-439
http://www.jstor.org/pss/2282833
I'm interested in