Exemple #1
0
        /// <summary>
        /// Mengestimasi parameter
        /// </summary>
        private void EstimateParameters()
        {
            if (this.smaRadio.Checked == true)
            {
                //get Orde
                try { this.maProperties.orde = int.Parse(this.OrdeBox.Text); }
                catch { this.maProperties.orde = 2; }

                sma = new SingleMovingAverage(this.variable, this.maProperties.orde);

                this.maProperties.isSingleMA = true;

                this.maTable.singleSmoothed = sma.Smoothed1;
                this.maTable.predicted      = sma.Predicted;
                this.maTable.residual       = sma.Residual;

                this.maProperties.includedObservations = sma.IncludedObservations;
                this.maProperties.sseMA  = sma.SSE;
                this.maProperties.mseMA  = sma.MSE;
                this.maProperties.maeMA  = sma.MAE;
                this.maProperties.mpeMA  = sma.MPE;
                this.maProperties.mapeMA = sma.MAPE;
            }

            if (this.dmaRadio.Checked == true)
            {
                try { this.maProperties.orde = int.Parse(this.OrdeBox.Text); }
                catch { this.maProperties.orde = 2; }

                dma = new DoubleMovingAverage(this.variable, this.MaProperties.orde);

                this.maProperties.isSingleMA = false;

                this.maTable.singleSmoothed = dma.Smoothed1;
                this.maTable.doubleSmoothed = dma.Smoothed2;
                this.maTable.predicted      = dma.Predicted;
                this.maTable.residual       = dma.Residual;

                this.maProperties.includedObservations = dma.IncludedObservations;
                this.maProperties.sseMA  = dma.SSE;
                this.maProperties.mseMA  = dma.MSE;
                this.maProperties.maeMA  = dma.MAE;
                this.maProperties.mpeMA  = dma.MPE;
                this.maProperties.mapeMA = dma.MAPE;
            }
        }
        /// <summary>
        /// Mengestimasi parameter
        /// </summary>
        private void EstimateParameters()
        {
            if (this.smaRadio.Checked == true)
            {
                //get Orde
                try { this.maProperties.orde = int.Parse(this.OrdeBox.Text); }
                catch { this.maProperties.orde = 2; }

                sma = new SingleMovingAverage(this.variable, this.maProperties.orde);

                this.maProperties.isSingleMA = true;

                this.maTable.singleSmoothed = sma.Smoothed1;
                this.maTable.predicted = sma.Predicted;
                this.maTable.residual = sma.Residual;

                this.maProperties.includedObservations = sma.IncludedObservations;
                this.maProperties.sseMA = sma.SSE;
                this.maProperties.mseMA = sma.MSE;
                this.maProperties.maeMA = sma.MAE;
                this.maProperties.mpeMA = sma.MPE;
                this.maProperties.mapeMA = sma.MAPE;
            }

            if (this.dmaRadio.Checked == true)
            {
                try { this.maProperties.orde = int.Parse(this.OrdeBox.Text); }
                catch { this.maProperties.orde = 2; }

                dma = new DoubleMovingAverage(this.variable, this.MaProperties.orde);

                this.maProperties.isSingleMA = false;

                this.maTable.singleSmoothed = dma.Smoothed1;
                this.maTable.doubleSmoothed = dma.Smoothed2;
                this.maTable.predicted = dma.Predicted;
                this.maTable.residual = dma.Residual;

                this.maProperties.includedObservations = dma.IncludedObservations;
                this.maProperties.sseMA = dma.SSE;
                this.maProperties.mseMA = dma.MSE;
                this.maProperties.maeMA = dma.MAE;
                this.maProperties.mpeMA = dma.MPE;
                this.maProperties.mapeMA = dma.MAPE;
            }
        }