예제 #1
0
 void genToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         GenForm form = new GenForm(matrX, matrY, arrXAv, arrXName, arrYName);
         if (form.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         matrX        = form.matrXM;
         matrY        = form.matrYM;
         arrReport[0] = "Наблюдения (в скобках указаны ненормированные значения)" +
                        Quality.DataTable2(arrXName, arrYName, matrX, matrY, arrXAv, arrYAv);
         arrReport[1]    = form.repSmp;
         arrReport[2]    = form.repHSmp;
         arrReport[3]    = form.repId;
         arrReport[4]    = form.repHId;
         arrReport[5]    = form.repCorrXY;
         arrReport[6]    = form.repCorr;
         arrReport[7]    = form.repHCorr;
         arrReport[8]   += form.repGen;
         wb.DocumentText = arrReport[0];
     }
     catch
     {
         MessageBox.Show("Ошибка создания модели");
     }
 }
예제 #2
0
        void importToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ImportForm form = new ImportForm();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            matrX    = form.matrX;
            matrY    = form.matrY;
            arrXName = form.arrXName;
            arrYName = form.arrYName;
            arrYMin  = form.arrYMin;
            arrYMax  = form.arrYMax;
            arrXAv   = form.arrXAv;
            arrYAv   = form.arrYAv;
            ClastForm cf = new ClastForm(arrYName);

            if (cf.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            matrLL          = cf.matrLL;
            clusters        = cf.tbC.Text;
            arrRep          = new string[11];
            arrRep[0]       = Quality.DataTable2(arrXName, arrYName, matrX, matrY);
            wb.DocumentText = arrRep[0];
        }
예제 #3
0
 void importToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         ImportForm form = new ImportForm();
         if (form.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         matrX    = form.matrX;
         matrY    = form.matrY;
         arrXName = form.arrXName;
         arrYName = form.arrYName;
         arrXAv   = form.arrXAv;
         arrYAv   = form.arrYAv;
         QMinMaxForm qf = new QMinMaxForm(arrYName);
         if (qf.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         arrYMin = qf.arrYMin;
         arrYMax = qf.arrYMax;
         for (int i = 0; i < arrYMin.Length; i++)
         {
             arrYMin[i] /= arrYAv[i];
             arrYMax[i] /= arrYAv[i];
         }
         ClustForm cf = new ClustForm(arrYName);
         if (cf.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         matrLL       = cf.matrLL;
         arrReport    = new string[14];
         arrReport[0] = "Наблюдения (в скобках указаны ненормированные значения)" +
                        Quality.DataTable2(arrXName, arrYName, matrX, matrY, arrXAv, arrYAv);
         arrReport[8]    = "";
         wb.DocumentText = arrReport[0];
         if (arrYName.Length == 2)
         {
             histToolStripMenuItem.Visible   = true;
             hist3dToolStripMenuItem.Visible = false;
         }
         else if (arrYName.Length == 3)
         {
             histToolStripMenuItem.Visible   = false;
             hist3dToolStripMenuItem.Visible = true;
         }
         else
         {
             histToolStripMenuItem.Visible   = false;
             hist3dToolStripMenuItem.Visible = false;
         }
     }
     catch
     {
         MessageBox.Show("Ошибка импорта");
         return;
     }
     try
     {
         int[] arrF;
         int   N;
         Quality.Clust(matrY, matrLL, arrYMin, arrYMax, out matrL, out arrF, out arrP, out N);
         arrReport[9] = string.Format("Общее количество наблюдений: {0}<br>" +
                                      "Количество наблюдений, попавших в рассматриваемую область качества: {1}<br>",
                                      matrX.GetLength(0), N);
         arrReport[10] = "Эмпирические вероятности попадания в кластеры (в скобках /.../ - ненормированные границы кластеров)" +
                         Quality.CTable(arrYName, matrL, arrYMin, arrYMax, arrF, arrP, arrYAv);
     }
     catch
     {
         MessageBox.Show("Ошибка кластеризации");
     }
 }