Changeset 12105 for branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 03/03/15 11:18:07 (10 years ago)
- Location:
- branches/HeuristicLab.DatasetRefactor/sources
- Files:
-
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DatasetRefactor/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 12037,12041,12057,12059-12060,12067,12069-12070,12072,12074,12076-12078,12085,12087-12091,12093,12095-12096,12100-12104
- Property svn:mergeinfo changed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 12069-12070,12103
- Property svn:mergeinfo changed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs
r12031 r12105 34 34 using HeuristicLab.PluginInfrastructure; 35 35 36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic .Creators{36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 37 37 public class MultiSymbolicDataAnalysisExpressionCreator : StochasticMultiBranch<ISymbolicDataAnalysisSolutionCreator>, 38 38 ISymbolicDataAnalysisSolutionCreator, -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r12031 r12105 118 118 </ItemGroup> 119 119 <ItemGroup> 120 <Compile Include="Analyzers\SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs" /> 120 121 <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs" /> 121 122 <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" /> … … 240 241 <Compile Include="TreeMatching\SymbolicExpressionTreeNodeComparer.cs" /> 241 242 <Compile Include="TreeMatching\SymbolicExpressionTreeNodeEqualityComparer.cs" /> 243 <Compile Include="TreeMatching\SymbolicExpressionTreePhenotypicSimilarityCalculator.cs" /> 242 244 <None Include="HeuristicLab.snk" /> 243 245 <None Include="Plugin.cs.frame" /> -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r12031 r12105 23 23 using System.Drawing; 24 24 using System.Linq; 25 using HeuristicLab.Analysis;26 25 using HeuristicLab.Common; 27 26 using HeuristicLab.Common.Resources; … … 30 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 31 30 using HeuristicLab.Optimization; 32 using HeuristicLab.Optimization.Operators;33 31 using HeuristicLab.Parameters; 34 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 233 231 Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer()); 234 232 Operators.Add(new SymbolicExpressionTreeLengthAnalyzer()); 235 Operators.Add(new SingleObjectivePopulationDiversityAnalyzer()); 233 Operators.Add(new SymbolicExpressionTreeBottomUpSimilarityCalculator()); 234 Operators.Add(new SymbolicDataAnalysisBottomUpDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreeBottomUpSimilarityCalculator>().First())); 236 235 ParameterizeOperators(); 237 236 } … … 353 352 op.EvaluatorParameter.ActualName = EvaluatorParameter.Name; 354 353 } 355 foreach (var op in operators.OfType<SingleObjectiveSolutionSimilarityCalculator>()) {356 op.QualityVariableName = "Quality";357 op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;358 }359 foreach (var op in operators.OfType<SingleObjectivePopulationDiversityAnalyzer>()) {360 op.SimilarityCalculator = new SymbolicExpressionTreeBottomUpSimilarityCalculator();361 }362 354 } 363 355 -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r11978 r12105 34 34 [StorableClass] 35 35 [Item("SymbolicExpressionTreeBottomUpSimilarityCalculator", "A similarity calculator which uses the tree bottom-up distance as a similarity metric.")] 36 public class SymbolicExpressionTreeBottomUpSimilarityCalculator : S ingleObjectiveSolutionSimilarityCalculator {36 public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SolutionSimilarityCalculator { 37 37 private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" }; 38 38 39 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { } 40 protected override bool IsCommutative { get { return true; } } 39 41 40 42 [StorableConstructor] … … 60 62 61 63 public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) { 64 if (leftSolution == rightSolution) 65 return 1.0; 66 62 67 var t1 = leftSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; 63 68 var t2 = rightSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
r12012 r12105 30 30 [StorableClass] 31 31 [Item("SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")] 32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : S ingleObjectiveSolutionSimilarityCalculator {32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator { 33 33 [Storable] 34 34 private readonly SymbolicExpressionTreeNodeEqualityComparer comparer; … … 42 42 set { comparer.MatchConstantValues = value; } 43 43 } 44 45 protected override bool IsCommutative { get { return true; } } 44 46 45 47 [StorableConstructor]
Note: See TracChangeset
for help on using the changeset viewer.