Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Regression Analysis »
LinearRegression_LTE
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<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>()
)
void LinearRegression_LTE
(
float[] inYValues,
float[] inXValues,
int inSeedSubsetSize,
int? inEvalSubsetSize,
out LinearFunction outLinearFunction,
out float[] outEstimatedValues,
out float[] outResiduals,
out float[] outYInliers,
out float[] outXInliers,
out float outLTError,
out int diagIterationCount
)
Parameters
|
Name |
Type |
Range |
Default |
Description |
|
inYValues |
const Array<float>& |
|
|
Sequence of ordinates |
|
inXValues |
const Optional<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
Error type |
Description |
DomainError |
Inconsistent size of arrays in LinearRegression_LTE. |
DomainError |
Empty array of points in LinearRegression_LTE. |