- Timestamp:
- 04/27/16 16:21:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/ExpectedRuntimeHelper.cs
r13774 r13803 1 using HeuristicLab.Optimization; 1 using HeuristicLab.Common; 2 using HeuristicLab.Optimization; 2 3 using System; 3 4 using System.Collections.Generic; … … 24 25 } 25 26 26 var ert = double. NaN;27 var ert = double.PositiveInfinity; 27 28 29 var nRuns = successful.Count + unsuccessful.Count; 28 30 if (successful.Count > 0) { 29 if (unsuccessful.Count == 0) ert = successful.Average(); 30 else { 31 var ps = successful.Count / (double)(successful.Count + unsuccessful.Count); 32 ert = successful.Average() + ((1.0 - ps) / ps) * unsuccessful.Average(); 33 } 31 var succAvg = successful.Average(); 32 var succDev = successful.StandardDeviation(); 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); 34 38 } 35 return new ErtCalculationResult(successful.Count, (successful.Count + unsuccessful.Count), ert);39 return new ErtCalculationResult(successful.Count, nRuns, ert); 36 40 } 37 41
Note: See TracChangeset
for help on using the changeset viewer.