PHP Class MathPHP\Statistics\Regression\LOESS

A non-parametric method for fitting a smooth curve between two variables. https://en.wikipedia.org/wiki/Local_regression
Inheritance: extends NonParametricRegression, use trait MathPHP\Statistics\Regression\Methods\WeightedLeastSquares
Datei anzeigen Open project: markrogoyski/math-php

Protected Properties

Property Type Description
$number_of_points number Number of points considered in the local regression
number Smoothness parameter
integer Order of the polynomial fit

Public Methods

Method Description
__construct ( array $points, number , integer )
evaluate ( number $x ) : number 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.

Method Details

__construct() public method

public __construct ( array $points, number , integer )
$points array [ [x, y], [x, y], ... ]
number Smoothness parameter (bandwidth) Determines how much of the data is used to fit each local polynomial ((λ + 1) / n, 1]
integer Order of the polynomial to fit

evaluate() public method

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.
public evaluate ( number $x ) : number
$x number
return number

Property Details

$number_of_points protected_oe property

Number of points considered in the local regression
protected number $number_of_points
return number

protected_oe property

Smoothness parameter
protected number
return number

protected_oe property

Order of the polynomial fit
protected int
return integer