LinearRegression_LTE


Computes linear regression of given point set using Least Trimmed Error algorithm.

Syntax

C++
C#
Python
 
def LinearRegression_LTE(
	inYValues: list[float],
	/,
	*,
	inXValues: list[float] | None = None,
	inSeedSubsetSize: int = 3,
	inEvalSubsetSize: int | None = None
)
-> (
	outLinearFunction: LinearFunction,
	outEstimatedValues: list[float],
	outResiduals: list[float],
	outYInliers: list[float],
	outXInliers: list[float],
	outLTError: float,
	diagIterationCount: int
)

Parameters

Name Type Range Default Description
Input value inYValues list[float] Sequence of ordinates
Input value inXValues list[float] | None None Sequence of abscissae, or {0, 1, 2, ...} by default
Input value inSeedSubsetSize int 2 - 10 3 Number of points in one combination for getting a sample line
Input value inEvalSubsetSize int | None 3 - None Number of closest points used for evaluation of a sample line, or Auto if seed points are to be used
Output value outLinearFunction LinearFunction Linear function approximating the given point set
Output value outEstimatedValues list[float] The result of application of the computed function to the X values
Output value outResiduals list[float] Difference between an input Y value and the corresponding estimated value
Output value outYInliers list[float] Coordinate of the inlying points of the best LTE line
Output value outXInliers list[float] Coordinate of the inlying points of the best LTE line
Output value outLTError float The Least Trimmed Error
Diagnostic input diagIterationCount int Number of combinations considered