[SciPy-User] scipy.interpolate.rbf: how is "smooth" defined?

denis denis-bz-gg@t-online...
Mon Aug 30 10:18:03 CDT 2010


On Aug 30, 1:10 pm, Mischa Schirmer <mis...@astro.uni-bonn.de> wrote:
> Hello,
...
> rbf has a 'smooth' parameter which is working well,
> but it is exteremly poorly documented. Basically,
> for smooth=0 no smoothing takes place, and for
> smooth>0 some smoothing takes place

nope, it's just an offset for the matrix A that RBF solves:
interpolate/rbf.py line 191 (scipy 0.8.0rc3)
    self.A = self._init_function(r) - eye(self.N)*self.smooth
    self.nodes = linalg.solve(self.A, self.di)

Josef, we went back and forth on this back in February, and I thought
agreed
-- the -= should be a +=  (but no ticket)
-- for gaussian, use smooth = -1e-6  to nudge the eigenvalues of A >
0;
others have eigenvalues < 0 and > 0, so leave smooth=0 .

Mischa, are you using Gaussian ?
You could then try varying epsilon aka r0 in exp( - (r / r0)^2 )
which has a big affect on the fit.
Its "default to approximate average distance between [all] nodes" is
not so hot,
better av distance to nearby nodes, i.e. smaller Gaussian peaks.

cheers
  -- denis


More information about the SciPy-User mailing list