计算“肘部”自动且数学地绘制曲线
曲线的一个示例如下所示。肘点可能是 x=3 或 4。 如何自动且数学地计算曲线的弯头?
One example for curve is shown as below. The elbow point might be x=3 or 4.
How to compute the elbow for a curve automatically and mathematically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我创建了一个 Python package 尝试实现 Kneedle 算法。
要重新创建上述函数并检测最大曲率点:
更新
Kneed 有一种改进的样条拟合方法来处理局部最小值,请使用
interp_method='polynomial'
。新情节:
I created a Python package that attempts to implement the Kneedle algorithm.
To recreate the function above and detect the point of maximum curvature:
update
Kneed has an improved spline fitting method for handling local minima, use
interp_method='polynomial'
.And the new plot:
您可能想要寻找具有最大绝对二阶导数的点,对于您在那里的一组离散点
x[i]
,可以用中心差来近似:secondDerivative [i] = x[i+1] + x[i-1] - 2 * x[i]
如上所述,您真正想要的是曲率最大的点,但二阶导数就可以了,这个中心差是二阶导数的一个很好的代表。
You might want to look for the point with the maximum absolute second derivative which, for a set of discrete points
x[i]
as you have there, can be approximated with a central difference:secondDerivative[i] = x[i+1] + x[i-1] - 2 * x[i]
As noted above, what you really want is the point with maximum curvature, but the second derivative will do, and this central difference is a good proxy for the second derivative.
像这样的函数因其形状通常被称为L 曲线。它们在通过正则化解决不适定问题时出现。
“肘”点是曲线上具有最大绝对二阶导数的点。
Functions like this one are usually called L-curves for their shapes. They appear when solving ill-posed problems through regularization.
The 'elbow'-point is the point on the curve with the maximum absolute second derivative.
你真正想要的是最大曲率的点。当斜率远小于 1 时,可以通过二阶导数来近似(如 @ebo 指出的),但情况并非总是如此。
What you really want is the point with maximum curvature. When the slope is much smaller than 1, this can be approximated by the second derivative (as @ebo points out), but this is not always the case.