Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9142


Ignore:
Timestamp:
01/10/13 09:48:22 (12 years ago)
Author:
epitzer
Message:

#1696 enable information analysis on very short walks

Location:
branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/Analysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/Analysis/InformationAnalysis.cs

    r8744 r9142  
    4646      Regularity = new HashSet<double>(differences).Count;
    4747      Diversity = new HashSet<double>(qualities).Count;
     48      var absDifferences = differences.Select(Math.Abs).OrderBy(d => d).ToList();
     49      nQuantiles = Math.Min(nQuantiles, absDifferences.Count);
    4850      var thresholds = (nQuantiles == 0
    49                          ? differences.Select(Math.Abs).OrderBy(d => d)
     51                         ? absDifferences
    5052                         : UniqueThresholdCalculator.DetermineThresholds(differences, nQuantiles)).ToList();
    5153      foreach (var eps in thresholds) {
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/Analysis/InformationAnalyzer.cs

    r8744 r9142  
    1919 */
    2020#endregion
     21
     22using System;
    2123using System.Linq;
    2224using HeuristicLab.Analysis.FitnessLandscape.DataTables;
     
    178180      int shapeSize = ShapeSizeParameter.ActualValue.Value;
    179181      var qualities = QualityTrailParameter.ActualValue.Rows.First().Values.ToList();
    180       if (qualities.Count > nQuantiles) {
     182      if (qualities.Count > 2) {
    181183        InformationAnalysisTable informationTable = InformationParameter.ActualValue;
    182184        var informationContent = informationTable.Rows["Information Content"].Values;
Note: See TracChangeset for help on using the changeset viewer.