private async void Ucz_Siec_Click(object sender, RoutedEventArgs e)
        {
            BlakWait.Visibility = Visibility.Visible;
            inputData           = new InputClass();
            if (Faces.Count < 1 || Faces == null)
            {
                MessageBox.Show("Error ! No data is loaded");
                BlakWait.Visibility = Visibility.Collapsed;
                return;
            }
            if (inputData.ValidateInput(TBLayers.Text, TBNeuronsInLayer.Text, ActivationFunction, CBObciazenie.SelectedIndex,
                                        TBIteracje.Text, TBWspUczenia.Text, TBWspBezwladnosci.Text, peopleNumber) == false)
            {
                BlakWait.Visibility = Visibility.Collapsed;
                return;
            }
            else
            {
                lblLearningError.Content   = "...";
                lblTestingError.Content    = "...";
                lblPeopleCount.Content     = "...";
                lblTimeElapsed.Content     = "...";
                lblValidationError.Content = "...";
                lblIterationsCount.Content = "...";
                await PerformCalculation();

                lblLearningError.Content   = inputData.LearningError;
                lblTestingError.Content    = inputData.TestingError;
                lblPeopleCount.Content     = inputData.PeopleCount;
                lblTimeElapsed.Content     = inputData.ElapsedTime.ToString();
                lblValidationError.Content = inputData.ValidationError;
                lblIterationsCount.Content = inputData.IterationsCount;
            }
            BlakWait.Visibility = Visibility.Collapsed;
        }
Esempio n. 2
0
        private async void Ucz_Siec_Click(object sender, RoutedEventArgs e)
        {
            BlakWait.Visibility = Visibility.Visible;
            inputData           = new InputClass();
            if (learningFaces.Count < 1 || learningFaces == null)
            {
                MessageBox.Show("Error ! No data is loaded");
                BlakWait.Visibility = Visibility.Collapsed;
                return;
            }
            if (testingFaces.Count < 1 || testingFaces == null)
            {
                MessageBox.Show("Error ! No data is loaded");
                BlakWait.Visibility = Visibility.Collapsed;
                return;
            }
            if (inputData.ValidateInput(TBLayers.Text, TBNeuronsInLayer.Text, ActivationFunction,
                                        TBIteracje.Text, TBWspUczenia.Text, TBWspBezwladnosci.Text) == false)
            {
                BlakWait.Visibility = Visibility.Collapsed;
                return;
            }
            else
            {
                LEnumber.Content = "---";
                TEnumber.Content = "---";
                Tnumber.Content  = "---";
                await PerformCalculation();

                LEnumber.Content = inputData.learningError.ToString();
                TEnumber.Content = inputData.testingError.ToString();
                Tnumber.Content  = inputData.timeElapsed.ToString();
            }
            BlakWait.Visibility = Visibility.Collapsed;
        }
Esempio n. 3
0
 private async void ReportButton_Click(object sender, RoutedEventArgs e)
 {
     BlakWait.Visibility = Visibility.Visible;
     inputData           = new InputClass();
     if (learningFaces.Count < 1 || learningFaces == null)
     {
         MessageBox.Show("Error ! No data is loaded");
         BlakWait.Visibility = Visibility.Collapsed;
         return;
     }
     if (testingFaces.Count < 1 || testingFaces == null)
     {
         MessageBox.Show("Error ! No data is loaded");
         BlakWait.Visibility = Visibility.Collapsed;
         return;
     }
     if (inputData.ValidateInput(TBLayers.Text, TBNeuronsInLayer.Text, ActivationFunction,
                                 TBIteracje.Text, TBWspUczenia.Text, TBWspBezwladnosci.Text) == false)
     {
         BlakWait.Visibility = Visibility.Collapsed;
         return;
     }
     else
     {
         await PerformReportDataCreation();
     }
     BlakWait.Visibility = Visibility.Collapsed;
 }
Esempio n. 4
0
        public void RunTest(List <List <Face> > faces, string calcStartDate, TimeSpan timeFromStart, bool[] activeFeatures = null)
        {
            InputClass inputData = new InputClass();

            inputData.ValidateInput((this.HiddenLayersCount).ToString(), (this.HiddenNeuronsCount).ToString(), new ActivationSigmoid(), this.IsBiased,
                                    (this.IterationsCount).ToString(), (this.LearningFactor).ToString(), (this.Momentum).ToString(), this.PeopleCount);

            this.PerformCalculation(inputData, faces, calcStartDate, timeFromStart, activeFeatures);
            this.LearningError = inputData.LearningError;
            this.TestingError  = inputData.TestingError;
            this.ElapsedTime   = inputData.ElapsedTime;
        }