Base class for regressions.
More...
Base class for regressions.
◆ __construct()
MathPHP\Statistics\Regression\Regression::__construct |
( |
array |
$points | ) |
|
Constructor - Prepares the data arrays for regression analysis.
- Parameters
-
array | $points | [ [x, y], [x, y], ... ] |
◆ evaluate()
MathPHP\Statistics\Regression\Regression::evaluate |
( |
float |
$x | ) |
|
Evaluate the regression equation at x Uses the instance model's evaluateModel method.
- Parameters
-
- Returns
- float
◆ getPoints()
MathPHP\Statistics\Regression\Regression::getPoints |
( |
| ) |
|
◆ getSampleSize()
MathPHP\Statistics\Regression\Regression::getSampleSize |
( |
| ) |
|
Get sample size (number of points)
- Returns
- int
◆ getXs()
MathPHP\Statistics\Regression\Regression::getXs |
( |
| ) |
|
Get Xs (x values of each point)
- Returns
- array of x values
◆ getYs()
MathPHP\Statistics\Regression\Regression::getYs |
( |
| ) |
|
Get Ys (y values of each point)
- Returns
- array of y values
◆ yHat()
MathPHP\Statistics\Regression\Regression::yHat |
( |
| ) |
|
Ŷ (yhat) A list of the predicted values of Y given the regression.
- Returns
- array
The documentation for this class was generated from the following file:
- src/Statistics/Regression/Regression.php