private void btnPlotAlpha_Click(object sender, EventArgs e) { Dictionary<int, double> result = new SesForecasting(originalDataset).Calculate(double.Parse(txtAlpha.Text)); for (int i = result.Count; i < lines.Length; i++) result.Add(i + 1, result.Last().Value); Plot(result, "SES"); }
private void btnOptimal_Click(object sender, EventArgs e) { Tuple<double, double, Dictionary<int, double>> result = new SesForecasting(originalDataset, 0.01, 0.01).CalculateOptimal(); lblAlpha.Text = "Optimal alpha: " + Math.Round(result.Item1, 2); lblStdError.Text = "Standard Error: " + Math.Round(result.Item2, 2); Plot(result.Item3, "SES"); }