Skip to content

Function: loess()

ts
function loess(
   x, 
   y, 
   opts?): Trend;

Defined in: stats/regression.ts:114

LOESS: locally-weighted linear regression with a tricube kernel. bandwidth is the fraction of points in each local neighbourhood (0..1, default 0.3) — larger is smoother. Returns the fit sampled on a sorted grid, so it can be drawn straight as a line.

Parameters

ParameterType
xArrayLike<number>
yArrayLike<number>
opts{ bandwidth?: number; points?: number; }
opts.bandwidth?number
opts.points?number

Returns

Trend

MIT licensed. WebGL2 required.