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

A model with a single explanatory variable. Fits a straight line through the set of n points in such a way that makes the sum of squared residuals of the model (that is, vertical distances between the points of the data set and the fitted line) as small as possible. https://en.wikipedia.org/wiki/Simple_linear_regression Having data points {(xᵢ, yᵢ), i = 1 ..., n } Find the equation y = mx + b _ _ __ x y - xy m = _________ _ __ (x)² - x² _ _ b = y - mx
Наследование: extends ParametricRegression, use trait MathPHP\Statistics\Regression\Methods\LeastSquares, use trait MathPHP\Statistics\Regression\Models\LinearModel
Показать файл Открыть проект

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

Метод Описание
calculate ( ) Calculates the regression parameters.

Описание методов

calculate() публичный Метод

Calculates the regression parameters.
public calculate ( )