Exemple #1
0
        private void confirmDataButton_Click(object sender, RoutedEventArgs e)
        {
            if ((bool)swapOrderCheckBox.IsChecked)
            {
                dataHolder.Shuffle();
            }

            int learningPercent = (int)learningDataSlider.Value;
            int validatePercent = (int)validateDataSlider.Value;
            int testingPercent  = (int)testingDataSlider.Value;

            MyCustomMessage customMessage = new MyCustomMessage()
            {
                Owner   = this,
                Message = "Trwa dzielenie danych..."
            };

            customMessage.Show();
            dataHolder.Load();

            dataHolder.Separate(learningPercent, validatePercent, testingPercent);

            customMessage.Close();
            MessageBox.Show(this, "Dane zostały podzielone");

            ShowDataGroupBox.IsEnabled = true;
            showDataComboBox_SelectionChanged(null, null);
        }
Exemple #2
0
        private void initData()
        {
            neuralNetwork                      = null;
            neuralNetStatus.Content            = "Brak";
            LearningSettingsGroupBox.IsEnabled = false;
            ShowDataGroupBox.IsEnabled         = false;

            expectedOutputLabel.Content    = "";
            neuralNetOutputLabel.Content   = "";
            outputProbabilityLabel.Content = "";

            MyCustomMessage customMessage = new MyCustomMessage()
            {
                Owner   = this,
                Message = "Trwa ładowanie danych..."
            };

            customMessage.Show();

            Thread thread = new Thread(() => { dataHolder.Load(); });

            thread.Start();
            thread.Join();

            List <BitArray>            distinctOutputs   = dataHolder.GetDistinctOutputs();
            Dictionary <int, BitArray> translatedOutputs = dataHolder.GetTranslateOutputs(distinctOutputs);

            outputConverter = new OutputConverter();

            foreach (KeyValuePair <int, BitArray> entry in translatedOutputs)
            {
                outputConverter.AddItem(entry.Value, entry.Key);
            }

            imageViewer = new ImageViewer(ImageGrid, dataHolder.ImageHeight, dataHolder.ImageWidth);

            DataSettingsGroupBox.IsEnabled = true;
            dataStatus.Content             = "Rekordów: " + dataHolder.Items.Count;

            customMessage.Close();
            MessageBox.Show(this, "Wczytano " + dataHolder.Items.Count + " rekordów");
        }