Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/18/17 15:40:34 (7 years ago)
Author:
bburlacu
Message:

#2635: Improve reporting of statistics about rejected individuals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.OSGAEvaluator/HeuristicLab.OSGAEvaluator/OSGAPredictionCountsAnalyzer.cs

    r14428 r14584  
    1 using System.Linq;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Linq;
    223using HeuristicLab.Analysis;
    324using HeuristicLab.Common;
     
    4465
    4566      ResultCollection predictionResults;
    46       DataTable rejectedStatsTable, totalStatsTable, rejectedStatsPerGenerationTable, nonRejectedStatsPerGenerationTable;
     67      DataTable rejectedStatsTable, totalStatsTable, rejectedStatsPerGenerationTable;
    4768      if (!ResultCollection.ContainsKey("OS Prediction")) {
    4869        predictionResults = new ResultCollection();
     
    5879        predictionResults.Add(new Result("Total Stats", totalStatsTable));
    5980        rejectedStatsPerGenerationTable = new DataTable("Rejected Per Generation");
    60         nonRejectedStatsPerGenerationTable = new DataTable("Non Rejected Stats per Generation");
    6181        foreach (var rowName in rejectedStats.RowNames) {
    6282          rejectedStatsPerGenerationTable.Rows.Add(new DataRow(rowName) { VisualProperties = { StartIndexZero = true, ChartType = DataRowVisualProperties.DataRowChartType.Line, LineWidth = 1 } });
    6383          rejectedStatsPerGenerationTable.Rows[rowName].Values.Add(0d);
    64           nonRejectedStatsPerGenerationTable.Rows.Add(new DataRow(rowName) { VisualProperties = { StartIndexZero = true, ChartType = DataRowVisualProperties.DataRowChartType.Line, LineWidth = 1 } });
    65           nonRejectedStatsPerGenerationTable.Rows[rowName].Values.Add(0d);
    6684        }
    6785        predictionResults.Add(new Result("Rejected Stats Per Generation", rejectedStatsPerGenerationTable));
    68         predictionResults.Add(new Result("Non Rejected Stats Per Generation", nonRejectedStatsPerGenerationTable));
    6986        ResultCollection.Add(new Result("OS Prediction", predictionResults));
    7087      } else {
     
    7390        totalStatsTable = (DataTable)predictionResults["Total Stats"].Value;
    7491        rejectedStatsPerGenerationTable = (DataTable)predictionResults["Rejected Stats Per Generation"].Value;
    75         nonRejectedStatsPerGenerationTable = (DataTable)predictionResults["Non Rejected Stats Per Generation"].Value;
    7692      }
    7793
     
    88104        var sum = row.Values.Sum();
    89105        row.Values.Add(totalStats[i, 0] - sum);
    90         row = nonRejectedStatsPerGenerationTable.Rows[rowName];
    91         sum = row.Values.Sum();
    92         row.Values.Add(totalStats[i, 1] - sum);
    93106        ++i;
    94107      }
Note: See TracChangeset for help on using the changeset viewer.