You are here: Start » AVL.NET » AVL.LinearRegression_TheilSen

AVL.LinearRegression_TheilSen

Computes linear regression of given point set using TheilSen algorithm.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void LinearRegression_TheilSen
(
	float[] inYValues,
	float[] inXValues,
	AvlNet.TheilSenVariant inVariant,
	out AvlNet.LinearFunction outLinearFunction,
	out float[] outEstimatedValues,
	out float[] outResiduals
)

Parameters

Name Type Range Default Description
inYValuesfloat[]Sequence of ordinates.
inXValuesfloat[]Sequence of abscissae, or {0, 1, 2, ...} by default. Default value: atl::NIL, or null.
inVariantAvlNet.TheilSenVariantSwitches between Theil-Sen and Siegel methods.
outLinearFunctionAvlNet.LinearFunctionLinear function approximating the given point set.
outEstimatedValuesfloat[]The result of application of the computed function to the X values.
outResidualsfloat[]Difference between an input Y value and the corresponding estimated value.

Errors

Error type Description
DomainError Inconsistent size of arrays in LinearRegression_TheilSen.
DomainError Empty array of points in LinearRegression_TheilSen.

See also