A method for robustly fitting a line to a set of points (simple linear regression) that
chooses the median slope among all lines through pairs of two-dimensional sample points.
https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator
Наследование:
extendsParametricRegression, use traitMathPHP\Statistics\Regression\Models\LinearModel
Calculate the regression parameters using the Theil-Sen method
Описание методов
calculate()
публичныйМетод
Procedure:
Calculate the slopes of all pairs of points and select the median value
Calculate the intercept using the slope, and the medians of the X and Y values.
b = Ymedian - (m * Xmedian)