Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/26/15 15:33:40 (10 years ago)
Author:
bburlacu
Message:

#2326: Moved phenotypic diversity analyzers one level up (since they can be applied to both single- and multiobjective problems). Added wiring in the multiobjective problems. Changed base class to SolutionSimilarityCalculator and adjusted analyzers.

Location:
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs

    r12075 r12086  
    4242    }
    4343
    44     public SymbolicDataAnalysisBottomUpDiversityAnalyzer(
    45       IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)
     44    public SymbolicDataAnalysisBottomUpDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators)
    4645      : base(validSimilarityCalculators) {
    4746      UpdateCounterParameter.ActualName = "GenotypicDiversityAnalyzerUpdateCounter";
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs

    r12049 r12086  
    3434  [StorableClass]
    3535  [Item("SymbolicExpressionTreeBottomUpSimilarityCalculator", "A similarity calculator which uses the tree bottom-up distance as a similarity metric.")]
    36   public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
     36  public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SolutionSimilarityCalculator {
    3737    private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" };
    3838    public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }
     39
     40    protected override bool IsCommutative { get { return true; } }
    3941
    4042    [StorableConstructor]
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs

    r12028 r12086  
    3030  [StorableClass]
    3131  [Item("SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")]
    32   public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
     32  public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator {
    3333    [Storable]
    3434    private readonly SymbolicExpressionTreeNodeEqualityComparer comparer;
     
    4242      set { comparer.MatchConstantValues = value; }
    4343    }
     44
     45    protected override bool IsCommutative { get { return true; } }
    4446
    4547    [StorableConstructor]
     
    8587    }
    8688
     89
    8790    public static double MaxCommonSubtreeSimilarity(ISymbolicExpressionTree a, ISymbolicExpressionTree b, ISymbolicExpressionTreeNodeSimilarityComparer comparer) {
    8891      int max = 0;
  • branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs

    r12068 r12086  
    3131  [Item("SymbolicExpressionTreePhenotypicSimilarityCalculator", "An operator that calculates the similarity betweeon two trees based on the correlation of their outputs.")]
    3232  [StorableClass]
    33   public class SymbolicExpressionTreePhenotypicSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
     33  public class SymbolicExpressionTreePhenotypicSimilarityCalculator : SolutionSimilarityCalculator {
    3434    [Storable]
    3535    public IDataAnalysisProblemData ProblemData { get; set; }
    3636    [Storable]
    3737    public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; set; }
     38
     39    protected override bool IsCommutative { get { return true; } }
    3840
    3941    [StorableConstructor]
     
    5052    }
    5153
    52     public SymbolicExpressionTreePhenotypicSimilarityCalculator() {
    53     }
     54    public SymbolicExpressionTreePhenotypicSimilarityCalculator() { }
    5455
    5556    public double CalculateSimilarity(ISymbolicExpressionTree t1, ISymbolicExpressionTree t2) {
Note: See TracChangeset for help on using the changeset viewer.