Changeset 16103
- Timestamp:
- 08/30/18 09:49:33 (6 years ago)
- 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; 1 using System; 4 2 using System.Collections.Generic; 5 3 using System.Globalization; 6 4 using System.Linq; 5 using HeuristicLab.Optimization; 7 6 8 7 namespace HeuristicLab.Analysis { … … 11 10 var successful = new List<double>(); 12 11 var unsuccessful = new List<double>(); 12 13 13 foreach (var graph in convGraphs) { 14 14 var targetAchieved = false; … … 28 28 29 29 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; 39 32 return new ErtCalculationResult(successful.Count, nRuns, ert); 40 33 }
Note: See TracChangeset
for help on using the changeset viewer.