Function: lowess()
ts
function lowess(x, y, options?): number[];Smooth y against x: the fitted value at each point, in the order of the input. Pairs with a non-finite value are dropped first (statsmodels' missing='drop'; their fitted values are NaN). Each point's neighbourhood is the ⌊frac · n⌋ nearest points (at least 2); a weighted least-squares line through them with tricube weights (1 − (d / dmax)³)³ gives the fitted value, and each of it further passes reweights the points by the bisquare of their residuals over six times the median absolute residual.
Parameters
| Parameter | Type |
|---|---|
x | ArrayLike<number> |
y | ArrayLike<number> |
options | LowessOptions |
Returns
number[]
Throws
If frac is outside 0–1.