Friday, October 07, 2005

Comparison of different increasing rate

In our project, we need compare different slopes of lines in order to decide whether to combine them. It looks an easy job! But the problem is that the slope is not as we usually define. The dataset used is composed of a series of values, i.e., a one-dimension data stream. When we plot all points in a figure, we take the horizontal axis to represent the sequence number of these points. Whereas, we use the vertical axis to measure the value of each point. The 'slope' of a line in such a plot, means kind of increasing rate. You can also call its slope, but it's impossible to associate it with the tangent of a degree. (Because the scales of two axis are different, the degree here is not meaningful!) When calculating the difference between two consecutive lines, I firstly try a conversion method. That is, the value of 'slope' here is normalized in the beginning by means of normalizing scales of both axis. Then we can use a degree to represent each 'slope'. Next, I use tangent function to calculate the difference of two 'slope'. Finally, translating the difference back to the axis system we use originally.
But after a second thought, I don't believe it is a good solution to calculate the difference of slopes. The main reason is that it is no point using a two-dimensional method to calculate one-dimension difference.
At last, I return for the old approach: just use the arithmatical difference between two 'slope' we get in the current coordinative system. (only minus is concerned!)

No comments: