拟合和插值都是利用已知的离散数据点来构造一个能够反映数据变化规律的近似函数,并以此预测或估计未知数据的方法.拟合方法在整体上寻求最好地逼近数据,适用于给定数据可能包含误差的情况,比如线性回归就是一种拟合方法;而插值方法要求近似函数经过所有的已知数据点,适用于需要高精度模型的场景,实际应用中常用多项式函数来逼近原函数,我们称之为多项式插值.例如,为了得到

的近似值,我们对函数

进行多项式插值.设一次函数

满足

, 可得

在

上的一次插值多项式

, 由此可计算出

的“近似值”

, 显然这个“近似值”与真实值的误差较大.为了减小插值估计的误差,除了要求插值函数与原函数在给定节点处的函数值相等,还可要求在部分节点处的导数值也相等,甚至要求高阶导数也相等.满足这种要求的插值多项式称为埃尔米特插值多项式.已知函数

在

上的二次埃尔米特插值多项式

满足

.