Function calculateAdaptiveWeights

  • Calculate the weights based on the control points and the MAD between the original data and the new baseline. MAD (Median Absolute Deviation) is more robust to outliers and the factor (1.4826) makes MAD scaled to be equivalent to the standard deviation for normal distributions. https://en.m.wikipedia.org/wiki/Median_absolute_deviation.

    Parameters

    • yData: NumberArray

      The original data.

    • baseline: NumberArray

      The new baseline calculated.

    • weights: NumberArray

      The current weights to be updated.

    • options: CalculateAdaptiveWeightsOptions

      Options for updating weights.

    Returns Float64Array<ArrayBuffer>

    new array of weights.