public double Predict(double x)
{
if (LoessIntervals == null || !LoessIntervals.Any())
{
throw new ApplicationException("Unable to predict because no intervals are available.");
}
LoessInterval interval = FindInterval(x);
if (interval == null)
{
throw new ApplicationException(String.Format("Unable to find an interval for {0}.", x));
}
return predict(x, interval);
}