/* * 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); } }
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(); }
private void EditProblem(object arg) { SourceProblem = (Problem)SelectedProblem.Clone(); IsEnabledPropertiesProblem = true; }