CanvasClean.LoessInterpolator.predict C# (CSharp) Method

predict() private static method

private static predict ( double x, double coefficients ) : double
x double
coefficients double
return double
        private static double predict(double x, double[] coefficients)
        {
            double y = 0;
            for (int i = 0; i < coefficients.Length; i++)
            {
                y += Math.Pow(x, i) * coefficients[i];
            }

            return y;
        }

Usage Example

Esempio n. 1
0
            private double predict(double x, LoessInterval interval)
            {
                var coeffs = LoessInterpolator.computeCoefficients(x, SortedXs, SortedYs, SortedRobustnessWeights, interval.BandwidthInterval);

                return(LoessInterpolator.predict(x, coeffs));
            }