Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/30/18 09:49:33 (6 years ago)
Author:
abeham
Message:

#1614: the exclusion of runs leads to somewhat unexpected results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1614_GeneralizedQAP/HeuristicLab.Analysis/3.3/QualityAnalysis/ExpectedRuntimeHelper.cs

    r15048 r16103  
    1 using HeuristicLab.Common;
    2 using HeuristicLab.Optimization;
    3 using System;
     1using System;
    42using System.Collections.Generic;
    53using System.Globalization;
    64using System.Linq;
     5using HeuristicLab.Optimization;
    76
    87namespace HeuristicLab.Analysis {
     
    1110      var successful = new List<double>();
    1211      var unsuccessful = new List<double>();
     12
    1313      foreach (var graph in convGraphs) {
    1414        var targetAchieved = false;
     
    2828
    2929      var nRuns = successful.Count + unsuccessful.Count;
    30       if (successful.Count > 0) {
    31         var succAvg = successful.Average();
    32         var succDev = successful.StandardDeviation() + 1e-7;
    33         successful.RemoveAll(x => x < succAvg - 2 * succDev);
    34         unsuccessful.RemoveAll(x => x < succAvg - 2 * succDev);
    35         nRuns = successful.Count + unsuccessful.Count;
    36 
    37         ert = successful.Average() / (successful.Count / (double)nRuns);
    38       }
     30      if (successful.Count > 0)
     31        ert = (successful.Average() * nRuns) / successful.Count;
    3932      return new ErtCalculationResult(successful.Count, nRuns, ert);
    4033    }
Note: See TracChangeset for help on using the changeset viewer.