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 | |
---|---|---|---|---|---|
inYValues | const Array<float>& | Sequence of ordinates | |||
inXValues | const Optional<const Array<float>&> | NIL | Sequence of abscissae, or {0, 1, 2, ...} by default | ||
inSeedSubsetSize | int | 2 - 10 | 3 | Number of points in one combination for getting a sample line | |
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 | |
outLinearFunction | LinearFunction& | Linear function approximating the given point set | |||
outEstimatedValues | Array<float>& | The result of application of the computed function to the X values | |||
outResiduals | Array<float>& | Difference between an input Y value and the corresponding estimated value | |||
outYInliers | Array<float>& | Coordinate of the inlying points of the best LTE line | |||
outXInliers | Array<float>& | Coordinate of the inlying points of the best LTE line | |||
outLTError | float& | The Least Trimmed Error | |||
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. |