[originally composed for Helena and Irina, but I thought I'd ask
everyone else since the availability of the new interpolation library
has recently been announced --jdm ]
I am about to do several experiments with s.surf.tps for a special
case using an analytic test function. I thought I'd check to see
if something similar has been implemented before I duplicate coding
and/or waste time.
My objective is to find optimal tension and smoothing parameters (no
segmenting) for Franke's exponential function with various noise
levels added to location and elevation. Optimality criteria will be
mean square error for elevation at each column/row site in the
current region.
Disk I/O for the elevation file and subsequent resampling to determine
error is one of the most time consuming operations and is not
necessary for these experiments. My thinking is that I could do an
entire evaluation in one shot (for a particular data set) over the range
of parameters that I want to examine:
smooth=min_smooth;
tension=min_tension;
while (smooth < max_smooth)
{
while (tension < max_tension)
{
for(i=0;i<n_columns;++i)
for(j=0;j<n_rows;++j)
/* calculate error from analytic function */
/* print or write error criteria */
tension+=dt; /* dt is the increment for tension parm */
}
smooth+=ds; /* ds is the increment for smoothing parm */
}
where I specify the range and resolution of the parameters
[min_smooth, max_smooth], ds, [min_tension, max_tension], and dt.
Do either of you have something like this implemented? I've only
begun reading the new code that was put on moon (I updated what Irina
sent to me earlier). It looks like IL_grid_calc_2d() is my starting
point for modifications.
Comments?
--Darrell
James Darrell McCauley, Purdue Univ, West Lafayette, IN 47907-1146, USA
mccauley@ecn.purdue.edu, mccauley%ecn@purccvm.bitnet, pur-ee!mccauley
P.S. I did this same experiments with some other software (which
forced me to write to disk for each interpolation)---it took
over two weeks of run time on a SPARCstation 10! CPU time
and disk access is at a premium around here.
P.P.S. for those not familiar, Franke's exponential test function
is that used (if I recall correctly) in:
@Article{ mitas88,
author = "Lubo\u{s} Mit\'{a}\u{s} and Helena Mit\`{a}\u{s}ov\'{a}",
title = "General Variational Approach to the Interpolation Problem",
journal = "Computers and Mathematics with Applications",
year = "1988",
volume = "16",
number = "12",
pages = "983--992"
}
and given by the following g.gnuplot input file:
set hidden
set nokey
set view 60, 120, 1, 1
set isosamples 33, 33
splot [0:1] [0:1] \
0.75 * exp(-((9.0*x-2.0)**2 + (9.0*y-2.0)**2)/4.0) \
+ 0.75 * exp(-(9.0*x+1.0)**2/49.0 - (9.0*y+1.0)/10.0) \
+ 0.50 * exp(-((9.0*x-7.0)**2 + (9.*y-3.)**2)/4.0) \
- 0.20 * exp(-(9.0*x-4.0)**2 - (9.0*y-7.0)**2)
pause -1