LinearRegression_TheilSen


Computes linear regression of given point set using TheilSen algorithm.

Syntax

C++
C#
Python
 
def LinearRegression_TheilSen(
	inYValues: list[float],
	/,
	*,
	inXValues: list[float] | None = None,
	inVariant: TheilSenVariant = TheilSenVariant.TheilSen
)
-> (
	outLinearFunction: LinearFunction,
	outEstimatedValues: list[float],
	outResiduals: list[float]
)

Parameters

Name Type 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 inVariant TheilSenVariant TheilSenVariant.TheilSen Switches between Theil-Sen and Siegel methods
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