Changeset 12281 for stable/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 04/01/15 17:43:13 (10 years ago)
- Location:
- stable
- Files:
-
- 6 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12103,12108,12110,12122
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r11947 r12281 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" /> -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r12280 r12281 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 PopulationSimilarityAnalyzer(new[] { new SymbolicExpressionTreeBottomUpSimilarityCalculator() })); 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 354 } 360 355 -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r12280 r12281 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() { } 39 40 protected override bool IsCommutative { get { return true; } } 40 41 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }42 41 43 42 [StorableConstructor] … … 63 62 64 63 public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) { 64 if (leftSolution == rightSolution) 65 return 1.0; 66 65 67 var t1 = leftSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; 66 68 var t2 = rightSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
r12280 r12281 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 : SingleObjectiveSolutionSimilarityCalculator { 33 protected override bool IsCommutative { get { return true; } } 34 32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator { 35 33 [Storable] 36 34 private readonly SymbolicExpressionTreeNodeEqualityComparer comparer; … … 44 42 set { comparer.MatchConstantValues = value; } 45 43 } 44 45 protected override bool IsCommutative { get { return true; } } 46 46 47 47 [StorableConstructor]
Note: See TracChangeset
for help on using the changeset viewer.