Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/31/13 14:39:34 (12 years ago)
Author:
ascheibe
Message:

#1886 added calculation of the overall parameter influence

File:
1 edited

Legend:

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

    r9197 r9198  
    140140    }
    141141
    142     private List<string> GetColumnNames(string parameterToExclude) {
     142    private List<string> GetColumnNames() {
    143143      string resultName = (string)resultComboBox.SelectedItem;
    144144      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
     
    147147                        select p.Key).Distinct();
    148148
    149       parameters = parameters.Where(x => x != "Seed" && x != "Algorithm Name" && x != parameterToExclude);
     149      parameters = parameters.Where(x => x != "Seed" && x != "Algorithm Name");
    150150
    151151      List<string> ret = new List<string>();
     
    226226      string parameterName = (string)parameterComboBox.SelectedItem;
    227227
    228       var columnNames = GetColumnNames(parameterName).ToArray();
    229       var rowNames = GetRowNames().ToArray();
     228      var columnNames = GetColumnNames().ToArray();
     229
     230      var tmpRowNames = GetRowNames();
     231      tmpRowNames.Add("Overall");
     232      var rowNames = tmpRowNames.ToArray();
    230233
    231234      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
    232235
    233       StringMatrix dt = new StringMatrix(CalculateParameterVariations(), columnNames.Count());
     236      StringMatrix dt = new StringMatrix(CalculateParameterVariations() + 1, columnNames.Count());
    234237      dt.RowNames = rowNames;
    235238      dt.ColumnNames = columnNames;
     
    240243        foreach (var columnName in columnNames) {
    241244          IEnumerable<IRun> curRuns = null;
    242           curRuns = runs.Where(x => x.Parameters.ContainsKey(columnName) && ContainsParameterValue(x, parameterName, rowName));
     245          if (i + 1 == rowNames.Count()) {
     246            //calculate Overall
     247            curRuns = runs.Where(x => x.Parameters.ContainsKey(columnName));
     248          } else {
     249            curRuns = runs.Where(x => x.Parameters.ContainsKey(columnName) && ContainsParameterValue(x, parameterName, rowName));
     250          }
    243251
    244252          var parameterVals = GetParameterVariatons(curRuns, columnName);
Note: See TracChangeset for help on using the changeset viewer.