Changeset 12075 for branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 02/25/15 17:53:25 (10 years ago)
- Location:
- branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic (added) merged: 12069
- Property svn:mergeinfo changed
-
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs
r12064 r12075 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using HeuristicLab.Analysis; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 26 using HeuristicLab.Optimization; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 28 … … 28 30 [Item("SymbolicDataAnalysisBottomUpDiversityAnalyzer", "A diversity analyzer based on the bottom-up distance between trees.")] 29 31 [StorableClass] 30 public class SymbolicDataAnalysisBottomUpDiversityAnalyzer : SingleObjectivePopulationDiversityAnalyzer {32 public class SymbolicDataAnalysisBottomUpDiversityAnalyzer : PopulationSimilarityAnalyzer { 31 33 [StorableConstructor] 32 34 protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(bool deserializing) : base(deserializing) { } … … 40 42 } 41 43 42 public SymbolicDataAnalysisBottomUpDiversityAnalyzer() { 43 SimilarityCalculator = new SymbolicExpressionTreeBottomUpSimilarityCalculator { SolutionVariableName = "SymbolicExpressionTree" }; 44 public SymbolicDataAnalysisBottomUpDiversityAnalyzer( 45 IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators) 46 : base(validSimilarityCalculators) { 47 UpdateCounterParameter.ActualName = "GenotypicDiversityAnalyzerUpdateCounter"; 44 48 } 45 49 } -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r12068 r12075 118 118 set { ProblemDataParameter.Value = value; } 119 119 } 120 120 121 public ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar { 121 122 get { return SymbolicExpressionTreeGrammarParameter.Value; } … … 126 127 set { SymbolicExpressionTreeInterpreterParameter.Value = value; } 127 128 } 129 128 130 public IntValue MaximumSymbolicExpressionTreeDepth { 129 131 get { return MaximumSymbolicExpressionTreeDepthParameter.Value; } … … 141 143 get { return RelativeNumberOfEvaluatedSamplesParameter.Value; } 142 144 } 145 143 146 public IntRange FitnessCalculationPartition { 144 147 get { return FitnessCalculationPartitionParameter.Value; } … … 228 231 Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer()); 229 232 Operators.Add(new SymbolicExpressionTreeLengthAnalyzer()); 230 Operators.Add(new SymbolicDataAnalysisBottomUpDiversityAnalyzer());231 233 Operators.Add(new SymbolicExpressionTreeBottomUpSimilarityCalculator()); 234 Operators.Add(new SymbolicDataAnalysisBottomUpDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreeBottomUpSimilarityCalculator>()) { DiversityResultName = "Genotypic Diversity" }); 232 235 ParameterizeOperators(); 233 236 } … … 349 352 op.EvaluatorParameter.ActualName = EvaluatorParameter.Name; 350 353 } 351 foreach (var op in operators.OfType<SymbolicExpressionTreeBottomUpSimilarityCalculator>()) {352 op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;353 }354 foreach (var op in operators.OfType<SymbolicDataAnalysisBottomUpDiversityAnalyzer>()) {355 var sim = Operators.OfType<SymbolicExpressionTreeBottomUpSimilarityCalculator>().FirstOrDefault();356 if (sim != null)357 op.SimilarityCalculator = sim;358 }359 354 } 360 355
Note: See TracChangeset
for help on using the changeset viewer.