Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Regression Analysis »
LinearRegression_TheilSen
LinearRegression_TheilSen
Computes linear regression of given point set using TheilSen algorithm.
Syntax
C++
C#
void avl::LinearRegression_TheilSen
(
const atl::Array<float>& inYValues,
const atl::Optional<atl::Array<float> >& inXValues,
avl::TheilSenVariant::Type inVariant,
avl::LinearFunction& outLinearFunction,
atl::Array<float>& outEstimatedValues,
atl::Array<float>& outResiduals
)
void LinearRegression_TheilSen
(
float[] inYValues,
float[] inXValues,
TheilSenVariant inVariant,
out LinearFunction outLinearFunction,
out float[] outEstimatedValues,
out float[] outResiduals
)
Parameters
|
Name |
Type |
Default |
Description |
|
inYValues |
const Array<float>& |
|
Sequence of ordinates |
|
inXValues |
const Optional<Array<float> >& |
NIL |
Sequence of abscissae, or {0, 1, 2, ...} by default |
|
inVariant |
TheilSenVariant::Type |
|
Switches between Theil-Sen and Siegel methods |
|
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 |
Errors
Error type |
Description |
DomainError |
Inconsistent size of arrays in LinearRegression_TheilSen. |
DomainError |
Empty array of points in LinearRegression_TheilSen. |