Changeset 10560
- Timestamp:
- 03/06/14 11:12:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionComparisonView.cs
r9135 r10560 93 93 if (problemData.Classes == 2) { 94 94 dataGridView.ColumnCount = 6; 95 dataGridView.Columns[4].HeaderText = "F1 Score Trainin ";95 dataGridView.Columns[4].HeaderText = "F1 Score Training"; 96 96 dataGridView.Columns[5].HeaderText = "F1 Score Test"; 97 97 } … … 108 108 var estimatedTrainingValues = solution.Model.GetEstimatedClassValues(dataset, trainingIndizes); 109 109 110 var testIndices = problemData.T rainingIndices;110 var testIndices = problemData.TestIndices; 111 111 var originalTestValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, testIndices); 112 112 var estimatedTestValues = solution.Model.GetEstimatedClassValues(dataset, testIndices); 113 113 114 114 OnlineCalculatorError errorState; 115 116 115 dataGridView[2, row].Value = MatthewsCorrelationCoefficientCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); 117 116 dataGridView[3, row].Value = MatthewsCorrelationCoefficientCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState); … … 129 128 130 129 private IEnumerable<IClassificationSolution> GenerateClassificationSolutions(IClassificationProblemData problemData) { 131 var solutions = new List<IClassificationSolution>();130 var newSolutions = new List<IClassificationSolution>(); 132 131 var zeroR = ZeroR.CreateZeroRSolution(problemData); 133 132 zeroR.Name = "0R Classification Solution"; 134 solutions.Add(zeroR);133 newSolutions.Add(zeroR); 135 134 var oneR = OneR.CreateOneRSolution(problemData, 6, new FastRandom()); 136 135 oneR.Name = "1R Classification Solution"; 137 solutions.Add(oneR);136 newSolutions.Add(oneR); 138 137 try { 139 138 var lda = LinearDiscriminantAnalysis.CreateLinearDiscriminantAnalysisSolution(problemData); 140 139 lda.Name = "Linear Discriminant Analysis Solution"; 141 solutions.Add(lda);140 newSolutions.Add(lda); 142 141 } 143 142 catch (NotSupportedException) { } 144 143 catch (ArgumentException) { } 145 return solutions;144 return newSolutions; 146 145 } 147 146
Note: See TracChangeset
for help on using the changeset viewer.