- Timestamp:
- 10/12/11 17:26:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
r6740 r6912 140 140 141 141 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); 144 144 rocPoints.Add(rocPoint); 145 145 } … … 150 150 151 151 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(); ; 153 153 154 154 Series series = new Series(className); … … 169 169 foreach (ROCPoint rocPoint in rocPoints) { 170 170 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; 173 173 point.Tag = rocPoint; 174 174 175 175 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); 180 180 point.ToolTip = sb.ToString(); 181 181 … … 249 249 private class ROCPoint { 250 250 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; } 261 261 } 262 262
Note: See TracChangeset
for help on using the changeset viewer.