Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6912 for trunk


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

#1653: Corrected coding conventions unit test.

Location:
trunk/sources
Files:
2 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
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs

    r6866 r6912  
    4040using HeuristicLab.Persistence.Default.Xml.Primitive;
    4141using HeuristicLab.Persistence.Interfaces;
     42using HeuristicLab_33.Tests;
    4243using Microsoft.VisualStudio.TestTools.UnitTesting;
    4344
     
    532533      List<string> lowerCaseProperties = new List<string>();
    533534      List<string> lowerCaseFields = new List<string>();
    534       foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) {
     535      foreach (Assembly a in PluginLoader.Assemblies) {
    535536        if (!a.GetName().Name.StartsWith("HeuristicLab"))
    536537          continue;
Note: See TracChangeset for help on using the changeset viewer.