Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/15 16:29:24 (9 years ago)
Author:
mkommend
Message:

#2326: Merged all branch changes in the trunk.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs

    r12100 r12103  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    2322using HeuristicLab.Analysis;
    2423using HeuristicLab.Common;
    2524using HeuristicLab.Core;
    26 using HeuristicLab.Optimization;
    2725using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2826
     
    3432    protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(bool deserializing) : base(deserializing) { }
    3533
    36     private SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicDataAnalysisBottomUpDiversityAnalyzer original, Cloner cloner)
     34    protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicDataAnalysisBottomUpDiversityAnalyzer original, Cloner cloner)
    3735      : base(original, cloner) {
    3836    }
     
    4240    }
    4341
    44     public SymbolicDataAnalysisBottomUpDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators)
    45       : base(validSimilarityCalculators) {
     42    public SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicExpressionTreeBottomUpSimilarityCalculator similarityCalculator)
     43      : base(new[] { similarityCalculator }) {
     44      DiversityResultName = "Genotypic Diversity";
    4645      UpdateCounterParameter.ActualName = "GenotypicDiversityAnalyzerUpdateCounter";
    4746    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs

    r12012 r12103  
    3434using HeuristicLab.PluginInfrastructure;
    3535
    36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Creators {
     36namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    3737  public class MultiSymbolicDataAnalysisExpressionCreator : StochasticMultiBranch<ISymbolicDataAnalysisSolutionCreator>,
    3838    ISymbolicDataAnalysisSolutionCreator,
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r11915 r12103  
    118118  </ItemGroup>
    119119  <ItemGroup>
     120    <Compile Include="Analyzers\SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs" />
    120121    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs" />
    121122    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" />
     
    240241    <Compile Include="TreeMatching\SymbolicExpressionTreeNodeComparer.cs" />
    241242    <Compile Include="TreeMatching\SymbolicExpressionTreeNodeEqualityComparer.cs" />
     243    <Compile Include="TreeMatching\SymbolicExpressionTreePhenotypicSimilarityCalculator.cs" />
    242244    <None Include="HeuristicLab.snk" />
    243245    <None Include="Plugin.cs.frame" />
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r12069 r12103  
    2323using System.Drawing;
    2424using System.Linq;
    25 using HeuristicLab.Analysis;
    2625using HeuristicLab.Common;
    2726using HeuristicLab.Common.Resources;
     
    3029using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3130using HeuristicLab.Optimization;
    32 using HeuristicLab.Optimization.Operators;
    3331using HeuristicLab.Parameters;
    3432using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    233231      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
    234232      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()));
    236235      ParameterizeOperators();
    237236    }
     
    353352        op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
    354353      }
    355       foreach (var op in operators.OfType<SingleObjectiveSolutionSimilarityCalculator>()) {
    356         op.QualityVariableName = "Quality";
    357         op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    358       }
    359354    }
    360355
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs

    r12070 r12103  
    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
     39    public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }
    3940    protected override bool IsCommutative { get { return true; } }
    40 
    41     public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }
    4241
    4342    [StorableConstructor]
     
    6362
    6463    public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) {
     64      if (leftSolution == rightSolution)
     65        return 1.0;
     66
    6567      var t1 = leftSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree;
    6668      var t2 = rightSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs

    r12070 r12103  
    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 {
    33     protected override bool IsCommutative { get { return true; } }
    34 
     32  public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator {
    3533    [Storable]
    3634    private readonly SymbolicExpressionTreeNodeEqualityComparer comparer;
     
    4442      set { comparer.MatchConstantValues = value; }
    4543    }
     44
     45    protected override bool IsCommutative { get { return true; } }
    4646
    4747    [StorableConstructor]
Note: See TracChangeset for help on using the changeset viewer.