| # Principle of polynomial regression The historical demand data can be represented by an nth degree polynom. This mathematical technique is applied to determine the trend influence and to make a demand forecast. An nth degree polynom is determined as follows: The polynom's degree varies from 0 to 9, in which a 0-degree polynom matches a constant equal to the average demand in the past. An nth degree polynom can be rendered as follows:
     2 n f(t) = a + b t + c	  t + ....... + k t
To determine the coefficients The coefficients of the polynom are determined by the method of the least square described in literature. You can minimize the sum of the quadratic deviations of the computed values from the actual values via mathematical differential equations. These equations lead to a system of linear equations, which you can solve with the Gauss-Seidel method. Accuracy of the polynom To determine the accuracy of the polynom, LN computes the variance of the forecast error for each polynom:
     VE = SQR(SUM((FD(t) - AD(t))^2) / m)
Where:
VE | the variance of the forecast error
FD(t) | the forecast demand for period t
AD(t) | the actual demand for period t
SQR | the root
SUM | the sum for all historical periods
m | the number of historical periods reduced by the polynom's degree minus 1
The polynom with the smallest variance of the forecast error is the optimum. Related topics Algorithm for demand forecasting Forecasting methods |