Esempio n. 1
0
        /*
         * Setting selected algorithm and test data rate.
         * After processing the network.
         */
        public void StartNetwork()
        {
            try
            {
                this.SelectedProblem.TrainTestDataRate = this.SelectedTrainingTestRate;
                switch (SelectedProblem)
                {
                case BankNotePredictor bankNotePredictor:
                    SelectedProblem.SetAlgorithm(this.SelectedBinaryAlgorithm);
                    break;

                case MNIST28Predictor mNIST28Predictor:
                    SelectedProblem.SetAlgorithm(this.SelectedMultiAlgorithm);
                    break;

                case EuroPredictor euroPredictor:
                    SelectedProblem.SetAlgorithm(this.SelectedRegressionAlgorithm);
                    break;
                }
                this.SelectedProblem.ProcessNetwork();
            }
            catch (Exception e)
            {
                MessageBox.Show("Error" + e.Message);
            }
        }
Esempio n. 2
0
        private async void Calculate(object obj)
        {
            MarkBusy();

            Stopwatch stopwatch = Stopwatch.StartNew();

            Answer = await SelectedProblem.SolveAsync();

            stopwatch.Stop();

            RunTimeText = "Answer found in " + stopwatch.ElapsedMilliseconds.ToString("#,##0") + "ms";

            MarkFree();
        }
Esempio n. 3
0
 private void EditProblem(object arg)
 {
     SourceProblem = (Problem)SelectedProblem.Clone();
     IsEnabledPropertiesProblem = true;
 }