LOESS - Locally Weighted Scatterplot Smoothing (Local regression)
More...
|
| __construct ($points, float $α, int $λ) |
|
| evaluate (float $x) |
| Evaluate for x Use the smoothness parameter α to determine the subset of data to consider for local regression. More...
|
|
| __construct (array $points) |
| Constructor - Prepares the data arrays for regression analysis. More...
|
|
| evaluate (float $x) |
| Evaluate the regression equation at x Uses the instance model's evaluateModel method. More...
|
|
| getPoints () |
| Get points. More...
|
|
| getXs () |
| Get Xs (x values of each point) More...
|
|
| getYs () |
| Get Ys (y values of each point) More...
|
|
| getSampleSize () |
| Get sample size (number of points) More...
|
|
| yHat () |
| Ŷ (yhat) A list of the predicted values of Y given the regression. More...
|
|
|
| $α |
|
| $λ |
|
| $number_of_points |
|
| $points |
|
| $xs |
|
| $ys |
|
| $n |
|
LOESS - Locally Weighted Scatterplot Smoothing (Local regression)
A non-parametric method for fitting a smooth curve between two variables. https://en.wikipedia.org/wiki/Local_regression
◆ __construct()
MathPHP\Statistics\Regression\LOESS::__construct |
( |
|
$points, |
|
|
float |
$α, |
|
|
int |
$λ |
|
) |
| |
- Parameters
-
array | $points | [ [x, y], [x, y], ... ] |
float | $α | Smoothness parameter (bandwidth) Determines how much of the data is used to fit each local polynomial ((λ + 1) / n, 1] |
int | $λ | Order of the polynomial to fit |
- Exceptions
-
◆ evaluate()
MathPHP\Statistics\Regression\LOESS::evaluate |
( |
float |
$x | ) |
|
Evaluate for x Use the smoothness parameter α to determine the subset of data to consider for local regression.
Perform a weighted least squares regression and evaluate x.
- Parameters
-
- Returns
- float
- Exceptions
-
The documentation for this class was generated from the following file:
- src/Statistics/Regression/LOESS.php