private void btnTrainARIMA_Click(object sender, EventArgs e) { if (_trainDataSeries == null || _trainDataSeries.Count == 0) { MessageBox.Show("Please set data for training", null, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } ARIMAModel.SetData(_trainDataSeries); ARIMAModel.AutomaticTraining(); List<double> errorARIMASeries; ARIMAModel.GetErrorSeries(out errorARIMASeries); NeuralModel.SetData(errorARIMASeries); radioBtnAutomaticARIMA.Checked = true; SettingGUIBeforeNeuralNetwork(); groupBoxARIMAParameter.Enabled = false; txtRegularDifferencing.Text = ""; txtSeasonDifferencing.Text = ""; txtSeasonPartern.Text = ""; txtARRegular.Text = ""; txtMARegular.Text = ""; txtARSeason.Text = ""; txtMASeason.Text = ""; string model; ARIMAModel.GetModel(out model); ARIMA_Model ARIMAResult = new ARIMA_Model(); ARIMAResult.SetResult(model); ARIMAResult.Show(); }
private void btnManualTrainingARIMA_Click(object sender, EventArgs e) { int regularDifferencing, pRegular, qRegular, pSeason, qSeason, seasonDifferencing, seasonPartern; try { pRegular = Int32.Parse(txtARRegular.Text); regularDifferencing = Int32.Parse(txtRegularDifferencing.Text); qRegular = Int32.Parse(txtMARegular.Text); pSeason = Int32.Parse(this.txtARSeason.Text); seasonDifferencing = Int32.Parse(this.txtSeasonDifferencing.Text); qSeason = Int32.Parse(this.txtMASeason.Text); seasonPartern = Int32.Parse(this.txtSeasonPartern.Text); ARIMAModel.ManualTraining(pRegular, regularDifferencing, qRegular, pSeason, seasonDifferencing, qSeason, seasonPartern); List<double> errorARIMASeries; ARIMAModel.GetErrorSeries(out errorARIMASeries); NeuralModel.SetData(errorARIMASeries); SettingGUIBeforeNeuralNetwork(); string model; ARIMAModel.GetModel(out model); ARIMA_Model ARIMAResult = new ARIMA_Model(); ARIMAResult.SetResult(model); ARIMAResult.Show(); } catch { MessageBox.Show("Input for SARIMA model is not correct", null, MessageBoxButtons.OK, MessageBoxIcon.Error); } }