-
Notifications
You must be signed in to change notification settings - Fork 7
Loess.Function.calculateLocalLinearRegression
commons-math-interpolation / Loess / calculateLocalLinearRegression
function calculateLocalLinearRegression(
xVals,
yVals,
weights,
x,
iLeft,
iRight,
accuracy
): number;Defined in: Loess.ts:367
Calculates the weighted least-squares linear fit at position x over the points iLeft ... iRight.
The points are weighted by the product of the passed weights and the tri-cube function
of their x distance from x, relative to the largest x distance within the interval.
ArrayLike<number>
The x values of the points, in monotonically increasing order.
ArrayLike<number>
The y values of the points.
ArrayLike<number> | undefined
The weights of the points, or undefined for the weight 1 for all points.
number
The x position at which the regression line is evaluated.
number
The index of the first point of the bandwidth interval.
number
The index of the last point of the bandwidth interval (inclusive).
number
If the weighted standard deviation of the x values is less than this value, the slope of the regression line is assumed to be 0.
number
The value of the regression line at x, or NaN if the sum of the weights is 0.
Error
If the interval iLeft ... iRight is inconsistent.