I'm going to be manipulating some 3-rd and 4-th rank tensors in
relatively high dimensions, and it would help a great deal to use only
the unique entries instead of repeating every operation 6 or 24 times.
Operations are tensor-matrix, tensor-vector, and tensor-tensor
multiplication.
Does any
I'm trying to build a model with an overall smooth function for all
the data, plus an additional smooth function for *some* of the data.
If "ind" is my indicator variable (0 for some x, 1 for others), I
imagined I could write it like this:
gam.obj <- gam(y ~ s(x) + ind*s(x))
but this does no
ng on in the usual
functions;
is there any way to avoid that and go straight to the calculaions?
Thanks
John Tillinghast
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEA
This is a trivial example I set up to see if I could pass an environment and
use the variables in it
(this is for a function that will be called many times and might need to use
a lot of variables that
won't be changing, so it seemed more sensible to use an environment).
Here's the code:
#
I've set up a simple tensor with indices 'a' and 'b'.
> ftable(B)
b u v w x y
a
a1 0.001868954 0.403345197 0.030088185 0.137252368 0.142634612
a2 0.396935972 0.945219795 0.068828465 0.314180585 0.446338719
a3 0.752412200 0.748810918 0.1255
mize over one (vector) argument.
As with optim, this C code will pass all the arguments for the user-provided
R function back into R, over and over.
I am open to any suggestions about how to do this simply and efficiently.
On Fri, Aug 22, 2008 at 2:16 PM, John Tillinghast <[EMAIL PROTECTED]>
I'm trying to figure this out with "Writing R Extensions" but there's not a
lot of detail on this issue.
I want to write a (very simple really) C external that will be able to take
"..." as an argument.
(It's for optimizing a function that may have several parameters besides the
ones being optimize
I'm solving the differential equation dy/dx = xy-1 with y(0) = sqrt(pi/2).
This can be used in computing the tail of the normal distribution.
(The actual solution is y(x) = exp(x^2/2) * Integral_x_inf {exp(-t^2/2) dt}
= Integral_0_inf {exp (-xt - t^2/2) dt}. For large x, y ~ 1/x, starting
around x~
8 matches
Mail list logo