Constructs a PolynomialLeastSquares instances that fits the given data.

Namespace:  CenterSpace.NMath.Analysis
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public PolynomialLeastSquares(
	int degree,
	DoubleVector x,
	DoubleVector y,
	double rankTolerance
)
Visual Basic (Declaration)
Public Sub New ( _
	degree As Integer, _
	x As DoubleVector, _
	y As DoubleVector, _
	rankTolerance As Double _
)
Visual C++
public:
PolynomialLeastSquares(
	int degree, 
	DoubleVector^ x, 
	DoubleVector^ y, 
	double rankTolerance
)

Parameters

degree
Type: System..::.Int32
The degree of the desired fitted polynomial.
x
Type: CenterSpace.NMath.Core..::.DoubleVector
The x data.
y
Type: CenterSpace.NMath.Core..::.DoubleVector
The y data.
rankTolerance
Type: System..::.Double
Tolerance used to compute the effective rank of the design matrix in the least squares calculation.

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.InvalidArgumentExceptionThrown if the vectors are null or they contain no points. Also thrown if the degree is not positive. the
CenterSpace.NMath.Core..::.MismatchedSizeExceptionThrown if the vectors have unequal lengths.

See Also