private void BtnLoadDataFromFile2TrainingData_Click(object sender, EventArgs e) { if (!_modelImplementer.Ready) { return; } TxtboxLoadInformation.Clear(); PnlLoadTrainingData.BackColor = Color.LightCoral; Application.DoEvents(); _modelImplementer.LoadTrainingDataFromFile( trainingDataAbsolutePath: ModelSettings.TrainingData, trainingDataHasHeaders: ModelSettings.TrainingDataHasHeaders); if (_modelImplementer.ErrorHasOccured) { ShowMessageAlert(_modelImplementer.FailureInformation); TxtboxLoadInformation.Text = _modelImplementer.FailureInformation; } else { } PnlBuildPipelineAndModel.Enabled = !_modelImplementer.ErrorHasOccured; PnlLoadTestingDataAndEvaluate.Enabled = false; PnlLoadTrainingData.BackColor = Color.LightSeaGreen; PnlBuildPipelineAndModel.BackColor = Color.LightBlue; PnlLoadTestingDataAndEvaluate.BackColor = Color.LightBlue; }
private void BtnDisplayRandomDigit_Click(object sender, EventArgs e) { if (!_accordImplementer.Ready) { return; } TxtboxLoadInformation.Clear(); var aDigit = _accordImplementer.GetRandomTrainingData(); if (aDigit == null) { TxtboxLoadInformation.Text = "Load the data first!"; return; } LblRandomDigit.Text = aDigit.Item1.ToString(); PointPairList pointPairList = new ZedGraph.PointPairList(); for (int row = 0; row < 28; row++) { for (int col = 0; col < 28; col++) { var element = row + col * 28; if (aDigit.Item2[element] > 128) { pointPairList.Add(x: row, y: col); } } } GraphPane myPane = zedGraphControl1.GraphPane; myPane.CurveList.Clear(); LineItem myCurve = myPane.AddCurve("Performance", pointPairList, Color.Black, SymbolType.Square); myCurve.Line.IsVisible = false; myCurve.Symbol.Border.IsVisible = false; myCurve.Symbol.Fill = new Fill(Color.Firebrick); myCurve.Symbol.Size = 15; zedGraphControl1.Refresh(); }