Page 1 of 1

Problem with Smoothing function

Posted: Thu Apr 01, 2004 10:36 am
by 8575749
We are using TeeChart 6.01

Smoothing works great when smoothing only a few points in a graph. However, in our application each series consists of more than 3200 points. We need to smooth these series lines without interpolation and a smoothing factor of 5. I have noticed that for some reason, when the source series line is smoothed, the resulting series never has more than 601 points. This means that the maximum number of points we can have in our source series is 120 points (since 120 points multiplied by smoothing factor of 5 equels 600 points). I hope my explanation is clear enough so that you can grasp what I'm trying to say.

Why is it that the resulting smoothed series can only consist of a maximum of 601 points? A possible way around this problem is the fact we potentially only need to smooth about 25% of the points due to the nature of the data. But I need some assistance doing this though.

Any help will be greatly appreciated!

Smoothing

Posted: Thu Apr 01, 2004 11:54 am
by 9078944
Yeah indeed the smooth function is working fine also for my case, I encountered the same problem as you, in my case only 250 points can be smoothed. When using more points the control doesn’t function anymore.
Maybe you can explain to me how you are able using more than 250 points.

Posted: Thu Apr 01, 2004 12:22 pm
by 8575749
The number of points you can smooth properly depends on the number of source series points multiplied by the smoothing factor. For example, if I have 20 points in my source series and my smoothing factor is 4, the resulting smoothed series would consist of 80 points (20 * 4) and that works fine. If I have 100 points in my source series and the smoothing factor is 4, the resulting smoothed series is 400 points which is still fine. 150 points and smoothing factor of 4 is also still fine because it doesn't go over 600 smooth points.

However, for some reason, if I for example have, say 200 points in my source series and a smoothing factor of 4, you would expect the smoothing to contain 800 points, but it doesn't, it still only has 600 points. Or if I have 100 source points and a smoothing factor of 10, you would expect 1000 smoothing points, but it stays at a maximum of 600 points. It's almost as if the BSpline based Smoothing function can not calculate a smoothing line which consists of more than 600 points.

Very weird indeed.

Posted: Fri Apr 02, 2004 4:26 am
by 8575749
Just read this on the Whats New list of TeeChart 7:
Removed limitation on number of source points to calculate smooth points.
(Fixed size arrays have been converted to dynamic arrays).

Warning: Smoothing more than 500 points can be a very slow operation.
We have now decided to upgrade to version 7.

Posted: Sun Oct 10, 2004 4:33 pm
by 8439796
the function is actually called smoothing spline, which is a cubic spline solver plus some smoothing minimization scheme. It's really good if you don't care about the orientation or condition of the end points of the curve.

But the method is very expensive due to its global scheme. IMHO, lots of local schemes are as good as spline considering the accuracy, and lot better considering the efficiency. "Moving Average" is one basic example.

Check Savitzky-Golay Smoothing ( very easy implementation).

Fang
Best regards