.netCHARTING v10.5 Documentation


dotnetCHARTING Namespace > ForecastEngine Class > TrendLinePolynomial Method : TrendLinePolynomial(Series,Int32) Method
A statistical series.
The degree of the polynomial which is fitted to the data set given (i.e. if degree is 2, then a quadratic is fitted).
TrendLinePolynomial(Series,Int32) Method
Fits a polynomial of a given degree to a data set in accordance with the least squares approach and returned the values of the fitted function over the same range of the x-coordinate as the given data set.
Syntax
'Declaration
 
Public Overloads Shared Function TrendLinePolynomial( _
   ByVal s As Series, _
   ByVal degree As Integer _
) As Series
'Usage
 
Dim s As Series
Dim degree As Integer
Dim value As Series
 
value = ForecastEngine.TrendLinePolynomial(s, degree)
public static Series TrendLinePolynomial( 
   Series s,
   int degree
)

Parameters

s
A statistical series.
degree
The degree of the polynomial which is fitted to the data set given (i.e. if degree is 2, then a quadratic is fitted).
Remarks
For example, if we fit a polynomial of degree 2, then we fit the quadratic polynomial (i.e. f(x) = a_0 + a_1 x + a_2 x^2); similarly if we fit a polynomial of degree 3, then we fit the cubic polynomial (i.e. f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3).
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also