Back to Aurora Vision Library website

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

LinearRegression_LTE


Header: AVL.h
Namespace: avl
Module: FoundationPro

Computes linear regression of given point set using Least Trimmed Error algorithm.

Syntax

C++
C#
 
void avl::LinearRegression_LTE
(
	const atl::Array<float>& inYValues,
	const atl::Optional<const atl::Array<float>&> inXValues,
	int inSeedSubsetSize,
	atl::Optional<int> inEvalSubsetSize,
	avl::LinearFunction& outLinearFunction,
	atl::Array<float>& outEstimatedValues,
	atl::Array<float>& outResiduals,
	atl::Array<float>& outYInliers,
	atl::Array<float>& outXInliers,
	float& outLTError,
	int& diagIterationCount = atl::Dummy<int>()
)

Parameters

Name Type Range Default Description
Input value inYValues const Array<float>& Sequence of ordinates
Input value inXValues const Optional<const Array<float>&> NIL Sequence of abscissae, or {0, 1, 2, ...} by default
Input value inSeedSubsetSize int 2 - 10 3 Number of points in one combination for getting a sample line
Input value inEvalSubsetSize Optional<int> 3 - NIL Number of closest points used for evaluation of a sample line, or Auto if seed points are to be used
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
Output value outYInliers Array<float>& Coordinate of the inlying points of the best LTE line
Output value outXInliers Array<float>& Coordinate of the inlying points of the best LTE line
Output value outLTError float& The Least Trimmed Error
Diagnostic input diagIterationCount int& Number of combinations considered

Errors

List of possible exceptions:

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