Beispiel #1
0
        private void btnDrop_Click(object sender, EventArgs e)
        {
            int       i  = lb.SelectedIndex;
            AlphaForm af = new AlphaForm();

            if (af.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            double alpha = double.Parse(af.tb.Text);
            string rep;

            int[]   arrI = arrS[i].DropoutErrors(alpha, out rep);
            ResForm rf   = new ResForm("Отсев аномальных наблюдений", rep);

            rf.ShowDialog();
            if (MessageBox.Show("Отсеять аномальные наблюдения?", "Подтвердите отсев наблюдений", MessageBoxButtons.YesNo) !=
                System.Windows.Forms.DialogResult.Yes)
            {
                return;
            }
            foreach (Sample s in arrS)
            {
                s.RemoveValues(arrI);
            }
            DataForm df = new DataForm(arrS);

            df.ShowDialog();
        }
Beispiel #2
0
        private void btnCheckReg_Click(object sender, EventArgs e)
        {
            int       index = lb.SelectedIndex;
            AlphaForm af    = new AlphaForm();

            if (af.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            double     alpha = double.Parse(af.tb.Text);
            Regression reg   = new Regression(arrS[index], arrStruct[index].ToArray());
            ResForm    rf    = new ResForm("Проверка значимости уравнения множественной регрессии", reg.CheckReg(alpha));

            rf.ShowDialog();
        }
Beispiel #3
0
        private void btnCheckNorm_Click(object sender, EventArgs e)
        {
            int       i  = lb.SelectedIndex;
            AlphaForm af = new AlphaForm();

            if (af.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            double alpha = double.Parse(af.tb.Text);

            double[] arrPNorm;
            string   rep = arrS[i].CheckNorm(alpha, out arrPNorm);
            ResForm  rf  = new ResForm("Проверка нормальности", rep);

            rf.ShowDialog();
        }
Beispiel #4
0
        private void btnCheckCorr_Click(object sender, EventArgs e)
        {
            List <Sample> lS = new List <Sample>(arrS);

            lS.RemoveAt(0);
            Regression reg = new Regression(arrS[0], lS.ToArray());
            AlphaForm  af  = new AlphaForm();

            if (af.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            double  alpha = double.Parse(af.tb.Text);
            string  rep   = reg.CheckCorr(alpha);
            ResForm rf    = new ResForm("Проверка значимости коэффициентов корреляции", rep);

            rf.ShowDialog();
        }
Beispiel #5
0
        void btnDropOut_Click(object sender, EventArgs e)
        {
            string[] arrName = new string[arrSmp.Length];
            for (int i = 0; i < arrName.Length; i++)
            {
                arrName[i] = arrSmp[i].name;
            }
            SelFactorForm sf = new SelFactorForm(arrName, "Выберете признак");

            if (sf.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            AlphaForm doForm = new AlphaForm();

            if (doForm.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            double alpha = doForm.GetAlpha();
            string rep;

            int[] arrI = arrSmp[sf.index].DropoutErrors(alpha, out rep);
            foreach (Sample smp in arrSmp)
            {
                smp.RemoveValues(arrI);
            }
            dgv.SuspendLayout();
            for (int i = arrI.Length - 1; i >= 0; i--)
            {
                dgv.Rows.RemoveAt(i);
            }
            RepForm rForm = new RepForm("Отсев аномальных измерений", rep);

            rForm.ShowDialog();
        }