Back to Aurora Vision Library website

You are here: Start » Function Reference » Data Classification » Regression Analysis » LinearRegression_TheilSen

LinearRegression_TheilSen


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Computes linear regression of given point set using TheilSen algorithm.

Syntax

C++
C#
 
void avl::LinearRegression_TheilSen
(
	const atl::Array<float>& inYValues,
	atl::Optional<const atl::Array<float>&> inXValues,
	avl::TheilSenVariant::Type inVariant,
	avl::LinearFunction& outLinearFunction,
	atl::Array<float>& outEstimatedValues,
	atl::Array<float>& outResiduals
)

Parameters

Name Type Default Description
Input value inYValues const Array<float>& Sequence of ordinates
Input value inXValues Optional<const Array<float>&> NIL Sequence of abscissae, or {0, 1, 2, ...} by default
Input value inVariant TheilSenVariant::Type Switches between Theil-Sen and Siegel methods
Output value outLinearFunction LinearFunction& Linear function approximating the given point set
Output value outEstimatedValues Array<float>& The result of application of the computed function to the X values
Output value outResiduals Array<float>& Difference between an input Y value and the corresponding estimated value

Errors

List of possible exceptions:

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