       Interpolation problem, optimization algorithms

• To: mathgroup at smc.vnet.net
• Subject: [mg58916] Interpolation problem, optimization algorithms
• From: Ed Peschko <esp5 at mdssdev05.comp.pge.com>
• Date: Sat, 23 Jul 2005 05:32:43 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```hey all,

I have a group of very noisy functions that I want to interpolate and simplify and
they have two things in common: they are diophantine, positive, and are almost
linear over certain ranges.

For example, one function might be linear for the first 10 values of x, then have
a different linear approximation over 11-50, then a different one over 51-100, etc.

Hence, I'd like to simplify them into piecewise linear functions, ie:

f[x_] := a1 * x + b1 /; x   < 10;
f[x_] := a2 * x + b2 /; 10  <= x < 50;
f[x_] := a3 * x + b3 /; 50  <= x < 100;
f[x_] := b4 /; x >= 100;

The main thing is, however, that I don't know beforehand *which* ranges correspond
to which equations - its not all that clear by just looking at the graphs -
and I'd like to find the best fit possible for each.

Anyways, what I was wondering was  - how do the Interpolation and ListInterpolation
functions work? Can you make them non-black box, and put constraints on them
like those listed above?

And if not, what approach would people suggest that I take? I've already tried
NMinimize with pretty poor results; the functions are slow, and don't seem to
converge to good solutions.

Ed

(
ps - is there a 'beefed up' version of the algorithms to do minimization problems
inside of Mathematica?  The one thing that I *did* try which seemed to have
good results was to hand-code a c program to do fitting and feed it into a