曲线拟合

title: 类型.
title: 将函数拟合至数据点 (Fitting functions to data points).
content: 最常见的是,一函数符合 的形式。
title: 拟合直线或多项式曲线.
content: 方程formula_1在笛卡尔平面上是一条直线,而这条直线的斜率是"a"。因为任何两点可以决定一条直线,因此总能找到次数不多于1的多项式来串起任何两个x值相异的点。  如果把多次式的次数增加到2  那么只要给定x值各异的3点,总会有次数不多于2的多项式可以把它们串起。  如果把多次式的次数再增加到3  那么只要给定x值各异的4点,总会有次数不多于3的多项式可以把它们串起。  对于这条多项式,更正确的描述是这条多项式附合任何4个限制。限制可以是一点(x,y)、角度或曲率(即半径的倒数 1/"R")。角度和曲率的限制通常在曲线的终端,因此称为终端条件 。为了样条(spline) 的交接平滑,通常会用到全等的终端条件。 也可以增加如曲率变化等高阶约束。例如,在高速公路立体交叉点苜蓿叶型的设计中,可以用来理解当汽车绕着交叉点运动时作用在汽车上的力,并依此设定合理的限定时速。  一次多项式也可以拟合一个单点和一个角度,三次多项式则可以拟合两点,一个角度约束以及一个曲率约束。许多其它类型的约束组合也同样可以用低阶或者高阶多项式来拟合。  如果有超过n+1个约束(n是多项式的阶次),仍然可以使用多项式拟合。通常一个满足所有约束的精确拟合不一定能够得到(但是有可能得到,例如,用一次多项式拟合共线的三点三点共线)。通常,我们需要使用一些方法来评价拟合的好坏。最小平方法就是用来评价差别的一种常用的方法。  不通过提高多项式的次数来更好的拟合曲线的原因有下:
title: 将其他函数拟合至数据点 (Fitting other functions to data points).
content: 其他类型的曲线在特定条件下也可使用,诸如三角函数 (如正弦或是余弦函数)。  在光谱学中,数据可以用高斯,罗伦兹,Voigt 和相关函数来拟合。  在农业中,反向逻辑 S函数 (S曲线)用于描述作物产量和生长因子之间的关系。 蓝色图形是将农田中测量数据进行S形回归得出的。 可以看出在初始情况,即土壤低盐度的状况下,作物产量在土壤盐度增加时缓慢降低,而之后降得更快。
title: 将平面曲线拟合至数据点 (Fitting plane curves to data points).
content: If a function of the form formula_4 cannot be postulated, one can still try to fit a plane curve.  Other types of curves, such as conic sections (circular, elliptical, parabolic, and hyperbolic arcs) or trigonometric functions (such as sine and cosine), may also be used, in certain cases. For example, trajectories of objects under the influence of gravity follow a parabolic path, when air resistance is ignored. Hence, matching trajectory data points to a parabolic curve would make sense. Tides follow sinusoidal patterns, hence tidal data points should be matched to a sine wave, or the sum of two sine waves of different periods, if the effects of the Moon and Sun are both considered.  For a parametric curve, it is effective to fit each of its coordinates as a separate function of arc length; assuming that data points can be ordered, the chord distance may be used.
title: Fitting a circle by geometric fit.
content: Coope approaches the problem of trying to find the best visual fit of circle to a set of 2D data points. The method elegantly transforms the ordinarily non-linear problem into a linear problem that can be solved without using iterative numerical methods, and is hence an order of magnitude faster than previous techniques.
title: Fitting an ellipse by geometric fit.
content: The above technique is extended to general ellipses by adding a non-linear step, resulting in a method that is fast, yet finds visually pleasing ellipses of arbitrary orientation and displacement.

Summary: 曲线拟合(fit theory),俗称拉曲线,是一种把现有数据透过数学方法来代入一条数式的表示方式。科学和工程问题可以通过诸如采样、实验等方法获得若干离散的数据,根据这些数据,我们往往希望得到一个连续的函数(也就是曲线)或者更加密集的离散方程与已知数据相吻合,这过程就叫做拟合 (fitting)。

Curve fitting: Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. Curve fitting can involve either interpolation, where an exact fit to the data is required, or smoothing, in which a "smooth" function is constructed that approximately fits the data. A related topic is regression analysis, which focuses more on questions of statistical inference such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization, to infer values of a function where no data are available, and to summarize the relationships among two or more variables. Extrapolation refers to the use of a fitted curve beyond the range of the observed data, and is subject to a degree of uncertainty since it may reflect the method used to construct the curve as much as it reflects the observed data.