[SciPy-User] Interpolation of function on a line vs 2D interpolation
Thu Apr 8 11:21:48 CDT 2010
I am a bit stuck with the following interpolation problem. I have to compute
z = f(x,y) whose arguments are realizations of components of a
two-dimensional random variable (X,Y), obtained by Monte Carlo. As each
Monte Carlo simulation gives me a pair (x(t), y(t)) where t = 0,...,N-1
enumerates Monte Carlo runs, I can equivalently say that my function f is
defined on a discretized line t = 0,..., N-1 in a 2D space. Now, as
calculation of function f is costly but the function itself is smooth, I
want to calculate it on a sparse subset of simulated 2D points (x(t),y(t)),
and then interpolate for the rest of points. (my sparse set includes
scenarios providing extreme values of x,y to avoid the need to
Though this problem could be viewed as a 2D interpolation and solved using
function interpolate.bisplrep, in practice I run out of memory with this
method as the number N of 2D points is about 100,000, and I get memory error
when trying to produce matrices of dimension 100,000x100,000 needed for
interpolate.bisplrep using function meshgrid. However, in view of what is
the problem can alternatively be viewed as interpolation of a function
defined on a line. I was unable to figure out how/whether I could use
function interpolate.splprep to this end.
Any help on this would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User