예제 #1
0
        public List <List <string> > Calculate()
        {
            MetricsCalculation metricsCalculation = new MetricsCalculation(pathSessions);

            List <List <string> > DataToForm = new List <List <string> >();

            foreach (string method in Methods)
            {
                List <string> vs  = new List <string>();
                var           res = metricsCalculation.RecognitionList(method);

                //метод
                vs.Add(method);
                //FAR
                vs.Add(CalculateFAR(res).ToString());
                //FRR
                vs.Add(CalculateFRR(res).ToString());
                //Точность
                vs.Add(CalculateCorrectness(res).ToString());

                DataToForm.Add(vs);
            }

            return(DataToForm);
        }
예제 #2
0
        private void Calculate_Click(object sender, EventArgs e)
        {
            var SelectedSessionIndex = SessionIndex.Text;
            var SelectedMethod       = ChooseMethod.SelectedItem;

            if (SelectedSessionIndex == "")
            {
                MessageBox.Show("Выберите номер сессии");
                return;
            }

            if (SelectedMethod == null)
            {
                MessageBox.Show("Выберите метод идентификации");
                return;
            }

            //распознавание
            MetricsCalculation metricsCalculation = new MetricsCalculation(pathSessions);

            metricsCalculation.RecognitionMethodCalculation(SelectedMethod.ToString(), Convert.ToInt32(SelectedSessionIndex.ToString()));
        }