Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/03/12 13:27:40 (12 years ago)
Author:
mkommend
Message:

#1915:

  • Corrected class names and class values caching in ClassificationProblemData
  • Removed caching of classification penalties
  • Corrected AccuracyMaximizationThresholdCalculator (retrieving of penalties was switched)
  • Added asserts for the achieved accuracy to the classification sample unit test
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis

  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs

    r8126 r8554  
    8585            //all positives
    8686            if (pair.TargetClassValue.IsAlmost(classValues[i - 1])) {
    87               if (pair.EstimatedValue > lowerThreshold && pair.EstimatedValue < actualThreshold)
     87              if (pair.EstimatedValue > lowerThreshold && pair.EstimatedValue <= actualThreshold)
    8888                //true positive
    89                 classificationScore += problemData.GetClassificationPenalty(classValues[i - 1], classValues[i - 1]);
     89                classificationScore += problemData.GetClassificationPenalty(pair.TargetClassValue, pair.TargetClassValue);
    9090              else
    9191                //false negative
    92                 classificationScore += problemData.GetClassificationPenalty(classValues[i], classValues[i - 1]);
     92                classificationScore += problemData.GetClassificationPenalty(pair.TargetClassValue, classValues[i]);
    9393            }
    9494              //all negatives
    9595            else {
    96               if (pair.EstimatedValue > lowerThreshold && pair.EstimatedValue < actualThreshold)
     96              if (pair.EstimatedValue > lowerThreshold && pair.EstimatedValue <= actualThreshold)
    9797                //false positive
    98                 classificationScore += problemData.GetClassificationPenalty(classValues[i - 1], classValues[i]);
     98                classificationScore += problemData.GetClassificationPenalty(pair.TargetClassValue, classValues[i - 1]);
    9999              else
    100100                //true negative, consider only upper class
    101                 classificationScore += problemData.GetClassificationPenalty(classValues[i], classValues[i]);
     101                classificationScore += problemData.GetClassificationPenalty(pair.TargetClassValue, pair.TargetClassValue);
    102102            }
    103103          }
Note: See TracChangeset for help on using the changeset viewer.