[GRASS-user] Cross-validation scripts for v.surf.rst?

Hamish hamish_nospam at yahoo.com
Fri Apr 27 01:52:53 EDT 2007


Jonathan Greenberg wrote:
> 
> I was wondering if anyone had written/acquired any cross-validation
> scripts for v.surf.rst to optimize the tension/smoothing parameters
> (they are alluded to in the documentation)?  


I was thinking the same. A shell script loop to test many values isn't
hard, although it might take a long time try all possibilities, log
v.univar results for each attempt, then search the result matrix for the
smallest error combo.


Questions:

* how does changing the region resolution affect the cross-validation
result? could you drop down to a half or quarter of the target raster
resolution to do the cross-validation tests and find the optimum value,
then when back at full res will the best values for those still be the
same?

also how does changing the region res affect computational time? is most
of the time is spent computing the splines, or by making the res coarser
are you effectively changing npmin & segmax settings? should they be
adjusted in tandem with the resolution?

is choosing a small (representative) subregion at the original
resolution preferred? how much of an art is there to picking a
representative subregion? could the script first scan the map for a
subregion with similar morphometric indices/fractal depth/stdev/
point density/whatever/ as the overall map, to do the trials on?


* are the smoothing and tension variables independent? (roughly):
min(f(smooth)) + min(f(tension)) == min( f(smooth,tension) )  ?

can you hold one of those terms steady, find the best fit using the
other, then hold the other steady while you vary the first? will the
variables found in that way be the final answer, or if they are somewhat
dependent should you use the result of the first set of tests as hinting
to help repeat the experiment and thus spiral towards the center?

Are the effects simple/smooth enough that the script could be "smart"
and dynamically adjust step size by rate of change of the cross-
validation variance to quick hone in on the best parameters?


Hamish




More information about the grass-user mailing list