views:

1983

answers:

5
A: 

It depends on what you mean by that. If you have a set of points f(x,y) -> z and you want to find a function that hits them all you could just do a spline.

If you have a known function and you want to adjust the parameters to minimize the RMS error, just consider x,y a composite object p (e.g., as if it were a complex or a 2-vector) and use an analog of the 2d case on f(p) -> z.

If you can be more specific about what you're trying to accomplish, I can be more specific with suggestions.

-- MarkusQ

So given the edited problem statement, I'd suggest the following:

  • If it's a time series (implied by your use of the term "trendline") I'd look at treating it as three parametric functions (x(t), y(t), z(t)) and doing 2d fitting on each of them.
  • Alternatively (but still assuming an ordered series), you may want to find a linear fit (a line through the heart of the cloud) and then add to that some sort of (probably polar) function based on the perpendicular projection from the points to the line.
  • If it isn't a time series (implied by the phrases "no known relation" and "point cloud") you have to define what "curve" you want to fit to them. Do you want a line? A surface / manifold? Do you want it to be a function of one or two of the variables, or independent of them (say, the convex hull). Does it have to be smooth, limited in degree, or...?

Really, the question is still too open ended.

MarkusQ
+2  A: 

A related questions is here:

http://stackoverflow.com/questions/529184/simple-multidimensional-curve-fitting

In general, you could view a problem like this from a statistical learning point of view. In other words, you have a set of basis functions (e.g., splines) parametrized in a certain way, and then you use least squares or some other regression technique to find optimal coefficients. I happen to like Elements of Statistical Learning

zweiterlinde
A: 

There is a new very nice work by Charles Fefferman (yes - the Fields medalist) and Boaz Klartag:

  • Fitting a C^m-Smooth Function to Data I, Ann. of Math., 169, no. 1, (2009), 315--346.

  • Fitting a C^m-Smooth Function to Data II, to appear in Rev. Mat. Iberoamericana.

You can find Both of them as pdf files on Klartag's home page

David Lehavi
+1  A: 

You could try additive (i.e single index models), as GAM http://www-stat.stanford.edu/software/gam/index.html

it's a greedy approach, very scalable, well implemented in several R packages

vak
A: 

Try the online 3D surface fitter at http://zunzun.com

James Phillips [email protected]

James Phillips