3

我有一组数据点 (x1,y1) (x2,y2) (x3,y3) 等。这些数据使得连续点的斜率大部分时间都在增加。但也有一些例外。我加载数据的软件期望斜率应该总是增加,或者换句话说,曲线应该是凸的。因此,我需要一组数据点 (x1,y1)、(x2,y2) 等,以便它删除“异常”数据点并用适当的数据点替换它们,这会导致斜率始终增加。

我打算编写一个程序(在 C# 中)来执行此操作,但我想我会在这里发布以检查这是否是一个标准问题并且可能已经存在解决方案。

4

1 回答 1

0

Solving the problem depends on the objective. You could restrict yourself to changing the Y coordinates of the points, while keeping X fixed. Then, a reasonable objective might be to minimize the sum of the absolute differences ABS(Y'-Y) between your new Y-value Y' and old value Y, for each point. (I have no idea whether this is reasonable for your problem, but it does not sound very unreasonable to me.)

Then the problem could be modelled as a linear program, see :

http://en.wikipedia.org/wiki/Linear_programming

There are standard libraries to find the optimal solution in such cases.

于 2012-06-20T21:04:20.350 回答