Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Regression Analysis »
LinearRegression_M
Computes linear regression of given point set using selected M-estimator for outlier suppression.
Syntax
C++
C#
void avl::LinearRegression_M
(
const atl::Array<float>& inYValues,
const atl::Optional<atl::Array<float> >& inXValues,
avl::MEstimator::Type inOutlierSuppression,
float inClippingFactor,
int inIterationCount,
atl::Optional<const avl::LinearFunction&> inInitialLinearFunction,
avl::LinearFunction& outLinearFunction,
atl::Array<float>& outEstimatedValues,
atl::Array<float>& outResiduals
)
void LinearRegression_M
(
float[] inYValues,
float[] inXValues,
MEstimator inOutlierSuppression,
float inClippingFactor,
int inIterationCount,
LinearFunction? inInitialLinearFunction,
out LinearFunction outLinearFunction,
out float[] outEstimatedValues,
out float[] outResiduals
)
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 |
|
inOutlierSuppression |
MEstimator::Type |
|
|
|
|
inClippingFactor |
float |
0.675 - 6.0 |
2.5f |
Multitude of standard deviation within which points are considered inliers |
|
inIterationCount |
int |
0 - |
5 |
Number of iterations of outlier suppressing algorithm |
|
inInitialLinearFunction |
Optional<const LinearFunction&> |
|
NIL |
Initial approximation of the output linear function (if available) |
|
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_M. |