Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9061 for branches


Ignore:
Timestamp:
12/17/12 08:34:08 (12 years ago)
Author:
ascheibe
Message:

#1886 added average of first, last, upper and lower 25% to statistical tabular view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.cs

    r8570 r9061  
    168168      string rowName = (string)dataRowComboBox.SelectedItem;
    169169
    170       string[] columnNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile", "Gradient", "Relative Error" };
     170      string[] columnNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile", "Gradient", "Relative Error", "Avg. of Upper 25 %", " Avg. of Lower 25 %", "Avg. of First 25 %", "Avg. of Last 25 %" };
    171171
    172172      var runs = Content.Where(x => x.Results.ContainsKey(resultName));
     
    194194        LinearLeastSquaresFitting.Calculate(values.ToArray(), out k, out d);
    195195        r = LinearLeastSquaresFitting.CalculateError(values.ToArray(), k, d);
     196        double lowerAvg = values.OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average();
     197        double upperAvg = values.OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average();
     198        double firstAvg = values.Take((int)(values.Count() * 0.25)).Average();
     199        double lastAvg = values.Skip((int)(values.Count() * 0.75)).Average();
    196200
    197201        dt[i, 0] = cnt.ToString();
     
    206210        dt[i, 9] = k.ToString();
    207211        dt[i, 10] = r.ToString();
     212        dt[i, 11] = upperAvg.ToString();
     213        dt[i, 12] = lowerAvg.ToString();
     214        dt[i, 13] = firstAvg.ToString();
     215        dt[i, 14] = lastAvg.ToString();
    208216
    209217        i++;
Note: See TracChangeset for help on using the changeset viewer.