You are here: Start » AVL.NET » AVL.LinearRegression_RANSAC

AVL.LinearRegression_RANSAC

Computes linear regression of given point set using RANSAC.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void LinearRegression_RANSAC
(
	float[] inYValues,
	float[] inXValues,
	int? inMaxOutlierCount,
	float inMaxInlierDistance,
	int? inIterationCount,
	out AvlNet.LinearFunction outLinearFunction,
	out float[] outEstimatedValues,
	out float[] outResiduals
)

Parameters

Name Type Range Default Description
inYValuesfloat[]Sequence of ordinates.
inXValuesfloat[]Sequence of abscissae, or {0, 1, 2, ...} by default. Default value: atl::NIL, or null.
inMaxOutlierCountint?Determines how many outlier points can be present to end the search. Default value: atl::NIL, or null.
inMaxInlierDistancefloatDistance from a line for point to be considered an inlier.
inIterationCountint?Number of iterations; Auto means that all point pairs will be used. Default value: atl::NIL, or null.
outLinearFunctionAvlNet.LinearFunctionLinear function approximating the given point set.
outEstimatedValuesfloat[]The result of application of the computed function to the X values.
outResidualsfloat[]Difference between an input Y value and the corresponding estimated value.

Errors

Error type Description
DomainError Inconsistent size of arrays in LinearRegression_RANSAC.

See also