Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/12/11 17:26:07 (13 years ago)
Author:
mkommend
Message:

#1653: Corrected coding conventions unit test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs

    r6740 r6912  
    140140
    141141              ROCPoint rocPoint = new ROCPoint(truePositiveRate, falsePositiveRate, lowerThreshold, upperThreshold);
    142               if (!rocPoints.Any(x => x.truePositiveRate >= rocPoint.truePositiveRate && x.falsePositiveRate <= rocPoint.falsePositiveRate)) {
    143                 rocPoints.RemoveAll(x => x.falsePositiveRate >= rocPoint.falsePositiveRate && x.truePositiveRate <= rocPoint.truePositiveRate);
     142              if (!rocPoints.Any(x => x.TruePositiveRate >= rocPoint.TruePositiveRate && x.FalsePositiveRate <= rocPoint.FalsePositiveRate)) {
     143                rocPoints.RemoveAll(x => x.FalsePositiveRate >= rocPoint.FalsePositiveRate && x.TruePositiveRate <= rocPoint.TruePositiveRate);
    144144                rocPoints.Add(rocPoint);
    145145              }
     
    150150
    151151          string className = Content.ProblemData.ClassNames.ElementAt(classValues.IndexOf(classValue));
    152           cachedRocPoints[className] = rocPoints.OrderBy(x => x.falsePositiveRate).ToList(); ;
     152          cachedRocPoints[className] = rocPoints.OrderBy(x => x.FalsePositiveRate).ToList(); ;
    153153
    154154          Series series = new Series(className);
     
    169169      foreach (ROCPoint rocPoint in rocPoints) {
    170170        DataPoint point = new DataPoint();
    171         point.XValue = rocPoint.falsePositiveRate;
    172         point.YValues[0] = rocPoint.truePositiveRate;
     171        point.XValue = rocPoint.FalsePositiveRate;
     172        point.YValues[0] = rocPoint.TruePositiveRate;
    173173        point.Tag = rocPoint;
    174174
    175175        StringBuilder sb = new StringBuilder();
    176         sb.AppendLine("True Positive Rate: " + rocPoint.truePositiveRate);
    177         sb.AppendLine("False Positive Rate: " + rocPoint.falsePositiveRate);
    178         sb.AppendLine("Upper Threshold: " + rocPoint.upperThreshold);
    179         sb.AppendLine("Lower Threshold: " + rocPoint.lowerThreshold);
     176        sb.AppendLine("True Positive Rate: " + rocPoint.TruePositiveRate);
     177        sb.AppendLine("False Positive Rate: " + rocPoint.FalsePositiveRate);
     178        sb.AppendLine("Upper Threshold: " + rocPoint.UpperThreshold);
     179        sb.AppendLine("Lower Threshold: " + rocPoint.LowerThreshold);
    180180        point.ToolTip = sb.ToString();
    181181
     
    249249    private class ROCPoint {
    250250      public ROCPoint(double truePositiveRate, double falsePositiveRate, double lowerThreshold, double upperThreshold) {
    251         this.truePositiveRate = truePositiveRate;
    252         this.falsePositiveRate = falsePositiveRate;
    253         this.lowerThreshold = lowerThreshold;
    254         this.upperThreshold = upperThreshold;
    255 
    256       }
    257       public double truePositiveRate { get; private set; }
    258       public double falsePositiveRate { get; private set; }
    259       public double lowerThreshold { get; private set; }
    260       public double upperThreshold { get; private set; }
     251        this.TruePositiveRate = truePositiveRate;
     252        this.FalsePositiveRate = falsePositiveRate;
     253        this.LowerThreshold = lowerThreshold;
     254        this.UpperThreshold = upperThreshold;
     255
     256      }
     257      public double TruePositiveRate { get; private set; }
     258      public double FalsePositiveRate { get; private set; }
     259      public double LowerThreshold { get; private set; }
     260      public double UpperThreshold { get; private set; }
    261261    }
    262262
Note: See TracChangeset for help on using the changeset viewer.