Register to reply 
Best piecewise linear interpolation 
Share this thread: 
#19
Oct413, 10:23 AM

Sci Advisor
HW Helper
PF Gold
P: 12,016

" Using least squares almost inevitably means you are going to have to have more segments than are needed by a minimax approach."
In full agreement to that. And? If you can come up with a minimax approach that is also of the same order of computations as my approach, I'm sure he'll appreciate it. I certainly will! 


#20
Oct413, 02:23 PM

Sci Advisor
HW Helper
PF Gold
P: 12,016

Empadoc:
DH gives very good advice to you if really want to minimize the number of line segments to use, but are willing to increase computation time somewhat. Thus, you really need to prioritize whether "shortest possible computation time" should override "fewest line segments to be used". 


#21
Oct413, 02:31 PM

Mentor
P: 15,167

An alternative to least squares is to use orthogonal polynomials, preferably Chebychev polynomials. For most wellbehaved functions, a Chebychev polynomial approximation comes very close to that magical function that minimizes the maximum absolute deviation, much closer than does a least squares regression. For this reason, making a Chebychev approximation is typically used as the initial step in a Remes exchange type algorithm. A Chebychev approximation is computationally of the same order as a least squares regression, so it's not an undue burden.



#22
Oct513, 03:21 AM

Sci Advisor
HW Helper
PF Gold
P: 12,016

First, you make a higher order polynomial interpolation of the data points with a nice class of polynomials, and then reappoximate that segmented polynomial with a piecewise linear interpolation? Sounds cool! 


#23
Oct813, 01:15 AM

P: 28

The costbenefit analysis here depends, obviously, on my specific needs. In this case I am in fact making an animation; so no stringency is needed if it just looks good... At the same time I am scientifically minded enough that I will probably try the more stringent fit that you so helpfully put up, arildno! 


#24
Oct813, 06:44 AM

Sci Advisor
HW Helper
PF Gold
P: 12,016

Note the comments from DH:
Caring about the leaste squares mean error as I do in my approach will make for an extremely jagged line, relative to what can be gained through other techniques. DH says, at one point, that the computational burden need not be much heavier here than a least squares approach, so that might be an alternative to look into. 


Register to reply 
Related Discussions  
Reverse Linear Interpolation?  Precalculus Mathematics Homework  6  
Nonuniform bilinear interpolation  Linear & Abstract Algebra  2  
Linear interpolation  Programming & Computer Science  0  
Linear Interpolation  General Math  0  
Linear Interpolation  Differential Geometry  0 