Esempio n. 1
0
        protected override RegressionBar calculate()
        {
            if (isMissingData() || slope.hasNaN(1) || slope.hasInfinity(1) || slope.count() < 1)
            {
                return(RegressionBar.NAN);
            }
            var intercept = (weightedSum(y) - slope[0] * weightedSum(x)) / weightSum;

            return(new RegressionBar(intercept, slope[0], y.last(window), x.last(window), 2, weights));
        }
Esempio n. 2
0
 public bool hasInvalidNumbers(Spud <double> s)
 {
     return(s.hasInfinity(window) || s.hasNaN(window));
 }