//CumulativeSignedError = Sum( E(t) ) public static decimal CumulativeSignedError(ForecastTable dt, int IgnoreInitial) { string Filter = "Error Is Not Null AND Instance > " + IgnoreInitial.ToString(); if (dt.Select(Filter).Length == 0) { return(0); } return((Decimal)dt.Compute("SUM(Error)", Filter)); }
//MeanAbsolutePercentError = Sum( |PercentError| ) / n public static decimal MeanAbsolutePercentError(ForecastTable dt, int IgnoreInitial) { string Filter = "AbsolutePercentError Is Not Null AND Instance > " + IgnoreInitial.ToString(); if (dt.Select(Filter).Length == 0) { return(1); } return((Decimal)dt.Compute("AVG(AbsolutePercentError)", Filter)); }
//CumulativeAbsoluteError = Sum( |E(t)| ) public static decimal CumulativeAbsoluteError(ForecastTable dt, bool Holdout, int IgnoreInitial) { string Filter = "AbsoluteError Is Not Null AND Instance > " + IgnoreInitial.ToString(); if (Holdout) { Filter += " AND Holdout=True"; } if (dt.Select(Filter).Length == 0) { return(0); } return((Decimal)dt.Compute("SUM(AbsoluteError)", Filter)); }