math-php
Public Member Functions | Protected Attributes | List of all members
MathPHP\Statistics\Regression\LOESS Class Reference

LOESS - Locally Weighted Scatterplot Smoothing (Local regression) More...

Inheritance diagram for MathPHP\Statistics\Regression\LOESS:
Inheritance graph
[legend]
Collaboration diagram for MathPHP\Statistics\Regression\LOESS:
Collaboration graph
[legend]

Public Member Functions

 __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...
 
- Public Member Functions inherited from MathPHP\Statistics\Regression\Regression
 __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...
 

Protected Attributes

 
 
 
 
 $number_of_points
 
- Protected Attributes inherited from MathPHP\Statistics\Regression\Regression
 $points
 
 $xs
 
 $ys
 
 $n
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

MathPHP\Statistics\Regression\LOESS::__construct (   $points,
float  ,
int   
)
Parameters
array$points[ [x, y], [x, y], ... ]
floatSmoothness parameter (bandwidth) Determines how much of the data is used to fit each local polynomial ((λ + 1) / n, 1]
intOrder of the polynomial to fit
Exceptions
Exception

Member Function Documentation

◆ 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
float$x
Returns
float
Exceptions
Exception

The documentation for this class was generated from the following file: