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

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$n integer Number of points
$points array .. ]
$xs array X values of the original points
$ys [type] Y values of the original points

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

Метод Описание
__construct ( array $points ) Constructor - Prepares the data arrays for regression analysis
evaluate ( number $x ) : number Evaluate the regression equation at x Uses the instance model's evaluateModel method.
getPoints ( ) : array Get points
getSampleSize ( ) : integer Get sample size (number of points)
getXs ( ) : array Get Xs (x values of each point)
getYs ( ) : array Get Ys (y values of each point)
yHat ( ) : array Ŷ (yhat) A list of the predicted values of Y given the regression.

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

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

Constructor - Prepares the data arrays for regression analysis
public __construct ( array $points )
$points array [ [x, y], [x, y], ... ]

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

Evaluate the regression equation at x Uses the instance model's evaluateModel method.
public evaluate ( number $x ) : number
$x number
Результат number

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

Get points
public getPoints ( ) : array
Результат array

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

Get sample size (number of points)
public getSampleSize ( ) : integer
Результат integer

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

Get Xs (x values of each point)
public getXs ( ) : array
Результат array of x values

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

Get Ys (y values of each point)
public getYs ( ) : array
Результат array of y values

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

Ŷ (yhat) A list of the predicted values of Y given the regression.
public yHat ( ) : array
Результат array

Описание свойств

$n защищенное свойство

Number of points
protected int $n
Результат integer

$points защищенное свойство

.. ]
protected array $points
Результат array

$xs защищенное свойство

X values of the original points
protected array $xs
Результат array

$ys защищенное свойство

Y values of the original points
protected [type] $ys
Результат [type]