July 17th, 2006, 9:15 am
There is a very scientific way of doing this, and thats to use Bayesian inference.You should create a functional form that is capable of representing ANY function that could be a solution. What you pick will depend on the exact nature of the problem, for example if your f(x,y,z) can only take values from 0 to 1 then pick a function that does the same.Next step is to make an assertion about any error on your data points. Usually we assume that the x,y,z are exact and your f has gaussian noise, in which case use least squares as your measure of error (as explained by zeta - although I can't help but be nitpicky about the use of the chi^2 symbol for least squares. This is confusing with chi^2 itself which is divided by G).Now you want to maximise the posterior of your function given your input data. To do this you need to work out the likelihood and prior. You do not need the evidence in this case, unless you intend to compare two different trial functions (f(x,y,z) vs h(x,y,z) for example - you may wish to do this for reasons I'll explain later).Your likelihood is pretty easy - since we've assumed gaussian error (you can include varying s.d. or constant).Your prior should encompass your belief about this function. This is generally enclosed in a regularising function, most commonly to stop the function from having too much curvature. You can limit the curvature by putting the second derivative in a least squares cost function. This will stop you having sharp jumps and discontinuities in your function and will act to minimise the volatility.The regularising parameter itself can be found either by trial and error, or if you are hardcore you can infer this from your data as well.You may wish to implement this in a number of ways.Firstly you can use functions like fourier series, laplace series, RBF, or polynomials (i suggest using chebychev or hermite or similar for this not simple 1+x+x^2...). This will probably need truncating but the trick is to make the series far far longer than you need (cf with rounding decimals). Use the regulator to reduce the complexity not the function. You should get the same answer whatever function you use, just some are easier than others to work with. If the problem admits it the exponential family are very tractable and are worth a look.Secondly you can use neural networks, particularly MLPs, to act as your f(x,y,z). These are then trained using backprop, and you must include a regulariser to prevent overfitting. This isn't trivial.Thirdly, and the easiest, is to try a number of different simple models, none of which cover the fitting space, but together cover almost all possible f(x,y,z). You can maximise the posterior of these very easily separately. If you then calculate the evidence for each model you can decide which one is the best. This is much easier because you do not need to use a regularising function (your models are too simple to begin with to permit overfitting). The down side is that you won't truly cover the fitting space, and the functions you fit will be subjective choices.