- Timestamp:
- 05/15/19 13:28:57 (6 years ago)
- Location:
- branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalysis.cs
r16137 r16955 46 46 public List<double> QualityDelta { get; private set; } 47 47 public double InformationStability { get; private set; } 48 public intRegularity { get; private set; }49 public intDiversity { get; private set; }48 public double Regularity { get; private set; } 49 public double Diversity { get; private set; } 50 50 public Peak PeakInformationContent { get; private set; } 51 51 public Peak PeakSymmetricInformationContent { get; private set; } … … 71 71 var differences = Differences(qualities).ToList(); 72 72 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; 75 75 var absDifferences = differences.Select(Math.Abs).OrderBy(d => d).ToList(); 76 76 nQuantiles = Math.Min(nQuantiles, absDifferences.Count); … … 118 118 PeakTotalEntropy = GetPeak(QualityDelta, TotalEntropy); 119 119 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); 120 139 } 121 140 -
branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalyzer.cs
r16137 r16955 132 132 InformationStabilityParameter.ActualValue = @is; 133 133 results.AddOrUpdateResult(InformationStabilityParameter.Name, @is); 134 var regularity = new DoubleValue( 1.0 * analysis.Regularity / qualities.Count);134 var regularity = new DoubleValue(analysis.Regularity); 135 135 RegularityParameter.ActualValue = regularity; 136 136 results.AddOrUpdateResult(RegularityParameter.Name, regularity); 137 var diversity = new DoubleValue( 1.0 * analysis.Diversity / qualities.Count);137 var diversity = new DoubleValue(analysis.Diversity); 138 138 DiversityParameter.ActualValue = diversity; 139 139 results.AddOrUpdateResult(DiversityParameter.Name, diversity); -
branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Utilities/CurveAnalysis.cs
r16137 r16955 26 26 namespace HeuristicLab.Analysis.FitnessLandscape { 27 27 public static class CurveAnalysis<T> { 28 public static CurveAnalysisResult GetCharacteristics( List<List<Tuple<T, double>>> trajectories, Func<T, T, double> distFunc) {29 trajectories= trajectories.Where(x => x.Count > 5).ToList();30 if (traj ectories.Count == 0) return new CurveAnalysisResult(0, 0, 0, new[] { 0.0, 0.0, 0.0 }, new[] { 0.0, 0.0, 0.0 }, new[] { 0.0, 0.0, 0.0 });28 public static CurveAnalysisResult GetCharacteristics(IEnumerable<List<Tuple<T, double>>> trajectories, Func<T, T, double> distFunc) { 29 var traj = trajectories.Where(x => x.Count > 5).ToList(); 30 if (traj.Count == 0) return new CurveAnalysisResult(0, 0, 0, new[] { 0.0, 0.0, 0.0 }, new[] { 0.0, 0.0, 0.0 }, new[] { 0.0, 0.0, 0.0 }); 31 31 32 var symbols = GetSymbols(traj ectories);33 var f1 = traj ectories.Select(path => ApproximateDerivative(path, distFunc).ToList()).ToList();32 var symbols = GetSymbols(traj); 33 var f1 = traj.Select(path => ApproximateDerivative(path, distFunc).ToList()).ToList(); 34 34 var f2 = f1.Select(d1 => ApproximateDerivative(d1, distFunc).ToList()).ToList(); 35 35
Note: See TracChangeset
for help on using the changeset viewer.