Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/15/19 13:28:57 (6 years ago)
Author:
abeham
Message:

#2457: worked on thesis

Location:
branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalysis.cs

    r16137 r16955  
    4646    public List<double> QualityDelta { get; private set; }
    4747    public double InformationStability { get; private set; }
    48     public int Regularity { get; private set; }
    49     public int Diversity { get; private set; }
     48    public double Regularity { get; private set; }
     49    public double Diversity { get; private set; }
    5050    public Peak PeakInformationContent { get; private set; }
    5151    public Peak PeakSymmetricInformationContent { get; private set; }
     
    7171      var differences = Differences(qualities).ToList();
    7272      InformationStability = differences.Select(Math.Abs).Max();
    73       Regularity = new HashSet<double>(differences).Count;
    74       Diversity = new HashSet<double>(qualities).Count;
     73      Regularity = new HashSet<double>(differences).Count / (double)differences.Count;
     74      Diversity = new HashSet<double>(qualities).Count / (double)qualities.Count;
    7575      var absDifferences = differences.Select(Math.Abs).OrderBy(d => d).ToList();
    7676      nQuantiles = Math.Min(nQuantiles, absDifferences.Count);
     
    118118      PeakTotalEntropy = GetPeak(QualityDelta, TotalEntropy);
    119119      PeakSymmetricTotalEntropy = GetPeak(QualityDelta, SymmetricTotalEntropy);
     120    }
     121
     122    public IEnumerable<Tuple<string, object>> GetFeatures() {
     123      yield return Tuple.Create("InformationContent", (object)InformationContent[0]);
     124      yield return Tuple.Create("DensityBasinInformation", (object)DensityBasinInformation[0]);
     125      yield return Tuple.Create("PartialInformationContent", (object)PartialInformationContent[0]);
     126      yield return Tuple.Create("TotalEntropy", (object)TotalEntropy[0]);
     127      yield return Tuple.Create("InformationStability", (object)InformationStability);
     128      yield return Tuple.Create("Regularity", (object)Regularity);
     129      yield return Tuple.Create("Diversity", (object)Diversity);
     130      yield return Tuple.Create("SymmetricInformationContent", (object)SymmetricInformationContent[0]);
     131      yield return Tuple.Create("SymmetricDensityBasinInformation", (object)SymmetricDensityBasinInformation[0]);
     132      yield return Tuple.Create("SymmetricTotalEntropy", (object)SymmetricTotalEntropy[0]);
     133      yield return Tuple.Create("PeakInformationContent", (object)PeakInformationContent.Value);
     134      yield return Tuple.Create("PeakDensityBasinInformation", (object)PeakDensityBasinInformation.Value);
     135      yield return Tuple.Create("PeakTotalEntropy", (object)PeakTotalEntropy.Value);
     136      yield return Tuple.Create("PeakSymmetricInformationContent", (object)PeakSymmetricInformationContent.Value);
     137      yield return Tuple.Create("PeakSymmetricDensityBasinInformation", (object)PeakSymmetricDensityBasinInformation.Value);
     138      yield return Tuple.Create("PeakSymmetricTotalEntropy", (object)PeakSymmetricTotalEntropy.Value);
    120139    }
    121140
  • branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalyzer.cs

    r16137 r16955  
    132132      InformationStabilityParameter.ActualValue = @is;
    133133      results.AddOrUpdateResult(InformationStabilityParameter.Name, @is);
    134       var regularity = new DoubleValue(1.0 * analysis.Regularity / qualities.Count);
     134      var regularity = new DoubleValue(analysis.Regularity);
    135135      RegularityParameter.ActualValue = regularity;
    136136      results.AddOrUpdateResult(RegularityParameter.Name, regularity);
    137       var diversity = new DoubleValue(1.0 * analysis.Diversity / qualities.Count);
     137      var diversity = new DoubleValue(analysis.Diversity);
    138138      DiversityParameter.ActualValue = diversity;
    139139      results.AddOrUpdateResult(DiversityParameter.Name, diversity);
Note: See TracChangeset for help on using the changeset viewer.