PHP Класс MathPHP\Statistics\Regression\TheilSen

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
Наследование: extends ParametricRegression, use trait MathPHP\Statistics\Regression\Models\LinearModel
Показать файл Открыть проект

Открытые методы

Метод Описание
calculate ( ) 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)
public calculate ( )