Skip to content

Loess.Interface.LoessInterpolatorParms

Christian d'Heureuse edited this page Sep 25, 2026 · 1 revision

commons-math-interpolation / Loess / LoessInterpolatorParms

Interface: LoessInterpolatorParms

Defined in: Loess.ts:146

Parameters for createLoessInterpolator.

Extends

Properties

accuracy?

optional accuracy?: number;

Defined in: Loess.ts:124

The accuracy threshold. Must be finite and >= 0. If the median residual is less than or equal to this value, no more robustness iterations are performed. Additionally, if the weighted standard deviation of the x values within a local regression is less than this value, the slope of the local regression line is assumed to be 0.

Default Value

1E-12

Inherited from

SmoothParms.accuracy


bandwidthFraction?

optional bandwidthFraction?: number;

Defined in: Loess.ts:108

The fraction of the points (with a non-zero weight) that is used for each local regression. Must be greater than 0 and not greater than 1. The resulting number of points is limited to at least 2 and at most all points.

Default Value

0.3

Inherited from

SmoothParms.bandwidthFraction


diagInfo?

optional diagInfo?: LoessInterpolatorDiagInfo;

Defined in: Loess.ts:168

An optional object to receive diagnostics info.

Overrides

SmoothParms.diagInfo


interpolationMethod?

optional interpolationMethod?: BasicInterpolationMethod;

Defined in: Loess.ts:155

The interpolation method used to connect the smoothed points (knots). If there are too few knots for the method, a simpler method is used (akima → cubic → linear → nearestNeighbor). If no knots remain, the returned function always returns NaN.

Default Value

"akima"

minXDistance?

optional minXDistance?: number;

Defined in: Loess.ts:163

The minimum distance in x direction between the knots. Points with an x value that is closer than this to the previous knot are skipped. Points with the same x value as the previous knot are always skipped. The default is 1/100 of the x range of the points.


outlierDistanceFactor?

optional outlierDistanceFactor?: number;

Defined in: Loess.ts:135

The outlier distance, relative to the median residual. Must be finite and > 0. In robustness iterations, points with a residual of at least outlierDistanceFactor * medianResidual get the robustness weight 0. The other points are weighted with the bisquare function (1 - (residual / (outlierDistanceFactor * medianResidual))^2)^2. The median residual is computed over the points with a non-zero weight and a non-NaN smoothed value. Points with a NaN smoothed value get the robustness weight 0.

Default Value

6

Inherited from

SmoothParms.outlierDistanceFactor


robustnessIters?

optional robustnessIters?: number;

Defined in: Loess.ts:115

The maximum number of additional robustness iterations. 0 for a single regression pass without robustness weighting. Must be an integer >= 0.

Default Value

2

Inherited from

SmoothParms.robustnessIters


weights?

optional weights?: ArrayLike<number>;

Defined in: Loess.ts:100

Optional weights of the points. The values must be finite and should not be negative. Points with weight 0 are ignored for the local regressions, but a smoothed y value is computed for them. If undefined, all points have the weight 1.

Inherited from

SmoothParms.weights


xVals

xVals: ArrayLike<number>;

Defined in: Loess.ts:88

The x values of the points, in monotonically increasing order. Equal values are allowed. The values must be finite.

Inherited from

SmoothParms.xVals


yVals

yVals: ArrayLike<number>;

Defined in: Loess.ts:93

The y values of the points. The values must be finite.

Inherited from

SmoothParms.yVals

Clone this wiki locally