Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15279


Ignore:
Timestamp:
07/22/17 23:26:18 (7 years ago)
Author:
abeham
Message:

#2457: readded information analysis chart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalyzer.cs

    r13583 r15279  
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929using System.Linq;
     30using System;
    3031
    3132namespace HeuristicLab.Analysis.FitnessLandscape {
     
    7778      get { return (LookupParameter<DoubleValue>)Parameters["PeakDensityBasinInformation"]; }
    7879    }
     80    public ILookupParameter<DataTable> InformationAnalysisParameter {
     81      get { return (ILookupParameter<DataTable>)Parameters["InformationAnalysis"]; }
     82    }
    7983    #endregion
    8084
     
    99103      Parameters.Add(new LookupParameter<DoubleValue>("PeakInformationContent", "Maximum information content at any quality delta."));
    100104      Parameters.Add(new LookupParameter<DoubleValue>("PeakDensityBasinInformation", "Maximum density basin information at any quality delta."));
     105
     106      Parameters.Add(new LookupParameter<DataTable>("InformationAnalysis", "Graphical analysis of information theoretic features."));
    101107    }
    102108
     
    145151      AddOrUpdateResult(results, PeakDensityBasinInformationParameter.Name, peakDbi);
    146152
     153      var itable = GetInformationTable(analysis);
     154      AddOrUpdateResult(results, InformationAnalysisParameter.Name, itable);
    147155      return base.Apply();
     156    }
     157
     158    private static DataTable GetInformationTable(InformationAnalysis analysis) {
     159      var dt = new DataTable("Information Analysis");
     160      var ic = new DataRow("Information Content");
     161      var pic = new DataRow("Partial Information Content");
     162      var dbi = new DataRow("Density Basin Information");
     163      var te = new DataRow("Total Entropy");
     164      var e = new DataRow("Epsilon");
     165      e.VisualProperties.SecondYAxis = true;
     166      ic.Values.AddRange(analysis.InformationContent);
     167      pic.Values.AddRange(analysis.PartialInformationContent);
     168      dbi.Values.AddRange(analysis.DensityBasinInformation);
     169      te.Values.AddRange(analysis.TotalEntropy);
     170      e.Values.AddRange(analysis.QualityDelta);
     171      dt.Rows.Add(ic);
     172      dt.Rows.Add(pic);
     173      dt.Rows.Add(dbi);
     174      dt.Rows.Add(te);
     175      dt.Rows.Add(e);
     176      return dt;
    148177    }
    149178
Note: See TracChangeset for help on using the changeset viewer.