Back to FabImage Library website
You are here: Start » Function Reference » Data Classification » Regression Analysis » LinearRegression_LTE

LinearRegression_LTE
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Computes linear regression of given point set using Least Trimmed Error algorithm.
Syntax
C++
C#
void fil::LinearRegression_LTE ( const ftl::Array<float>& inYValues, const ftl::Optional<const ftl::Array<float>&> inXValues, int inSeedSubsetSize, ftl::Optional<int> inEvalSubsetSize, fil::LinearFunction& outLinearFunction, ftl::Array<float>& outEstimatedValues, ftl::Array<float>& outResiduals, ftl::Array<float>& outYInliers, ftl::Array<float>& outXInliers, float& outLTError, int& diagIterationCount = ftl::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. |