Changeset 5341
- Timestamp:
- 01/20/11 17:51:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification/3.3/Symbolic/SymbolicClassificationSolution.cs
r5332 r5341 114 114 double highestBestThreshold = double.NaN; 115 115 double bestClassificationScore = double.PositiveInfinity; 116 bool seriesOfEqualClassificationScores = false; 116 117 117 118 while (actualThreshold < originalClasses[i]) { … … 138 139 } 139 140 } 141 142 //new best classification score found 140 143 if (classificationScore < bestClassificationScore) { 141 144 bestClassificationScore = classificationScore; 142 145 lowestBestThreshold = actualThreshold; 143 146 highestBestThreshold = actualThreshold; 144 } else if (Math.Abs(classificationScore - bestClassificationScore) < double.Epsilon) 147 seriesOfEqualClassificationScores = true; 148 } 149 //equal classification scores => if seriesOfEqualClassifcationScores == true update highest threshold 150 else if (Math.Abs(classificationScore - bestClassificationScore) < double.Epsilon && seriesOfEqualClassificationScores) 145 151 highestBestThreshold = actualThreshold; 152 //worse classificatoin score found reset seriesOfEqualClassifcationScores 153 else seriesOfEqualClassificationScores = false; 146 154 147 155 actualThreshold += thresholdIncrement; 148 156 } 157 //scale lowest thresholds and highest found optimal threshold according to the misclassification matrix 149 158 double falseNegativePenalty = ProblemData.MisclassificationMatrix[i, i - 1]; 150 159 double falsePositivePenalty = ProblemData.MisclassificationMatrix[i - 1, i];
Note: See TracChangeset
for help on using the changeset viewer.