Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12103


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

#2326: Merged all branch changes in the trunk.

Location:
trunk/sources
Files:
12 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj

    r11623 r12103  
    126126    <Compile Include="ModelCreators\NormalDistributedThresholdsModelCreator.cs" />
    127127    <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" />
     128    <Compile Include="SymbolicClassificationPhenotypicDiversityAnalyzer.cs" />
    128129    <Compile Include="SymbolicClassificationPruningAnalyzer.cs" />
    129130    <Compile Include="SymbolicClassificationSolutionImpactValuesCalculator.cs" />
     
    222223      <Private>False</Private>
    223224    </ProjectReference>
     225    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
     226      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
     227      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
     228      <Private>False</Private>
     229    </ProjectReference>
    224230    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    225231      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r12012 r12103  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
     25using HeuristicLab.Optimization;
    2526using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    105106      Operators.Add(new SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer());
    106107      Operators.Add(new SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer());
     108      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
     109      Operators.Add(new SymbolicClassificationPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()));
    107110      ParameterizeOperators();
    108111    }
     
    135138          op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name;
    136139      }
     140
     141      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     142        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     143        op.QualityVariableName = Evaluator.QualitiesParameter.ActualName;
     144
     145        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
     146          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
     147          phenotypicSimilarityCalculator.ProblemData = ProblemData;
     148          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
     149        }
     150      }
    137151    }
    138152  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r12012 r12103  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.SingleObjective {
     31namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
    3232  [Item("Bounded Mean squared error Evaluator", "Calculates the bounded mean squared error of a symbolic classification solution (estimations above or below the class values are only penaltilized linearly.")]
    3333  [StorableClass]
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r12012 r12103  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Optimization;
    2425using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    115116      Operators.Add(new SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer());
    116117      Operators.Add(new SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer());
     118      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
     119      Operators.Add(new SymbolicClassificationPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()));
    117120      ParameterizeOperators();
    118121    }
     
    145148          op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name;
    146149      }
     150
     151      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     152        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     153        op.QualityVariableName = Evaluator.QualityParameter.ActualName;
     154
     155        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
     156          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
     157          phenotypicSimilarityCalculator.ProblemData = ProblemData;
     158          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
     159        }
     160      }
    147161    }
    148162  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs

    r12100 r12103  
    3434  [Item("SymbolicClassificationPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
    3535  [StorableClass]
    36   public class SymbolicClassificationPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer {
     36  public class SymbolicClassificationPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer,
     37    ISymbolicDataAnalysisBoundedOperator, ISymbolicDataAnalysisInterpreterOperator, ISymbolicExpressionTreeOperator {
    3738    #region parameter names
    3839    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
     
    8990
    9091      UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter";
     92      DiversityResultName = "Phenotypic Similarity";
    9193    }
    9294
     
    100102    }
    101103
    102     private SymbolicClassificationPhenotypicDiversityAnalyzer(SymbolicClassificationPhenotypicDiversityAnalyzer original, Cloner cloner)
     104    protected SymbolicClassificationPhenotypicDiversityAnalyzer(SymbolicClassificationPhenotypicDiversityAnalyzer original, Cloner cloner)
    103105      : base(original, cloner) {
    104106    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r11623 r12103  
    128128    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
    129129    <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />
     130    <Compile Include="SymbolicRegressionPhenotypicDiversityAnalyzer.cs" />
    130131    <Compile Include="SymbolicRegressionPruningAnalyzer.cs" />
    131132    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionLogResidualEvaluator.cs" />
     
    214215      <Private>False</Private>
    215216    </ProjectReference>
     217    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
     218      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
     219      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
     220      <Private>False</Private>
     221    </ProjectReference>
    216222    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    217223      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r12012 r12103  
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Optimization;
    2627using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    9394      Operators.Add(new SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer());
    9495      Operators.Add(new SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer());
     96      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
     97      Operators.Add(new SymbolicRegressionPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()));
    9598      ParameterizeOperators();
    9699    }
     
    122125        }
    123126      }
     127
     128      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     129        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     130        op.QualityVariableName = Evaluator.QualitiesParameter.ActualName;
     131
     132        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
     133          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
     134          phenotypicSimilarityCalculator.ProblemData = ProblemData;
     135          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
     136        }
     137      }
    124138    }
    125139  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r12012 r12103  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
     25using HeuristicLab.Optimization;
    2526using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    111112      Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer());
    112113      Operators.Add(new SymbolicRegressionSolutionsAnalyzer());
    113 
     114      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
     115      Operators.Add(new SymbolicRegressionPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()) { DiversityResultName = "Phenotypic Diversity" });
    114116      ParameterizeOperators();
    115117    }
     
    141143        }
    142144      }
     145
     146      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     147        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     148        op.QualityVariableName = Evaluator.QualityParameter.ActualName;
     149
     150        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
     151          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
     152          phenotypicSimilarityCalculator.ProblemData = ProblemData;
     153          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
     154        }
     155      }
    143156    }
    144157  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPhenotypicDiversityAnalyzer.cs

    r12100 r12103  
    3434  [Item("SymbolicRegressionPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
    3535  [StorableClass]
    36   public class SymbolicRegressionPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer {
     36  public class SymbolicRegressionPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer,
     37    ISymbolicDataAnalysisBoundedOperator, ISymbolicDataAnalysisInterpreterOperator, ISymbolicExpressionTreeOperator {
    3738    #region parameter names
    3839    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
     
    7273
    7374      UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter";
     75      DiversityResultName = "Phenotypic Diversity";
    7476    }
    7577
     
    8385    }
    8486
    85     private SymbolicRegressionPhenotypicDiversityAnalyzer(SymbolicRegressionPhenotypicDiversityAnalyzer original, Cloner cloner)
     87    protected SymbolicRegressionPhenotypicDiversityAnalyzer(SymbolicRegressionPhenotypicDiversityAnalyzer original, Cloner cloner)
    8688      : base(original, cloner) {
    8789    }
  • 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.