- Timestamp:
- 03/02/15 16:29:24 (10 years ago)
- 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 126 126 <Compile Include="ModelCreators\NormalDistributedThresholdsModelCreator.cs" /> 127 127 <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" /> 128 <Compile Include="SymbolicClassificationPhenotypicDiversityAnalyzer.cs" /> 128 129 <Compile Include="SymbolicClassificationPruningAnalyzer.cs" /> 129 130 <Compile Include="SymbolicClassificationSolutionImpactValuesCalculator.cs" /> … … 222 223 <Private>False</Private> 223 224 </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> 224 230 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 225 231 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
r12012 r12103 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Data; 25 using HeuristicLab.Optimization; 25 26 using HeuristicLab.Parameters; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 105 106 Operators.Add(new SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer()); 106 107 Operators.Add(new SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer()); 108 Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator()); 109 Operators.Add(new SymbolicClassificationPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>())); 107 110 ParameterizeOperators(); 108 111 } … … 135 138 op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name; 136 139 } 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 } 137 151 } 138 152 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs
r12012 r12103 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification .SingleObjective{31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 32 32 [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.")] 33 33 [StorableClass] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
r12012 r12103 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 115 116 Operators.Add(new SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer()); 116 117 Operators.Add(new SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer()); 118 Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator()); 119 Operators.Add(new SymbolicClassificationPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>())); 117 120 ParameterizeOperators(); 118 121 } … … 145 148 op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name; 146 149 } 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 } 147 161 } 148 162 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs
r12100 r12103 34 34 [Item("SymbolicClassificationPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")] 35 35 [StorableClass] 36 public class SymbolicClassificationPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer { 36 public class SymbolicClassificationPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer, 37 ISymbolicDataAnalysisBoundedOperator, ISymbolicDataAnalysisInterpreterOperator, ISymbolicExpressionTreeOperator { 37 38 #region parameter names 38 39 private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree"; … … 89 90 90 91 UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter"; 92 DiversityResultName = "Phenotypic Similarity"; 91 93 } 92 94 … … 100 102 } 101 103 102 pr ivateSymbolicClassificationPhenotypicDiversityAnalyzer(SymbolicClassificationPhenotypicDiversityAnalyzer original, Cloner cloner)104 protected SymbolicClassificationPhenotypicDiversityAnalyzer(SymbolicClassificationPhenotypicDiversityAnalyzer original, Cloner cloner) 103 105 : base(original, cloner) { 104 106 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r11623 r12103 128 128 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" /> 129 129 <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" /> 130 <Compile Include="SymbolicRegressionPhenotypicDiversityAnalyzer.cs" /> 130 131 <Compile Include="SymbolicRegressionPruningAnalyzer.cs" /> 131 132 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionLogResidualEvaluator.cs" /> … … 214 215 <Private>False</Private> 215 216 </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> 216 222 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 217 223 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
r12012 r12103 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Optimization; 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 93 94 Operators.Add(new SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer()); 94 95 Operators.Add(new SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer()); 96 Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator()); 97 Operators.Add(new SymbolicRegressionPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>())); 95 98 ParameterizeOperators(); 96 99 } … … 122 125 } 123 126 } 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 } 124 138 } 125 139 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r12012 r12103 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Optimization; 25 26 using HeuristicLab.Parameters; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 111 112 Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer()); 112 113 Operators.Add(new SymbolicRegressionSolutionsAnalyzer()); 113 114 Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator()); 115 Operators.Add(new SymbolicRegressionPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()) { DiversityResultName = "Phenotypic Diversity" }); 114 116 ParameterizeOperators(); 115 117 } … … 141 143 } 142 144 } 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 } 143 156 } 144 157 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPhenotypicDiversityAnalyzer.cs
r12100 r12103 34 34 [Item("SymbolicRegressionPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")] 35 35 [StorableClass] 36 public class SymbolicRegressionPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer { 36 public class SymbolicRegressionPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer, 37 ISymbolicDataAnalysisBoundedOperator, ISymbolicDataAnalysisInterpreterOperator, ISymbolicExpressionTreeOperator { 37 38 #region parameter names 38 39 private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree"; … … 72 73 73 74 UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter"; 75 DiversityResultName = "Phenotypic Diversity"; 74 76 } 75 77 … … 83 85 } 84 86 85 pr ivateSymbolicRegressionPhenotypicDiversityAnalyzer(SymbolicRegressionPhenotypicDiversityAnalyzer original, Cloner cloner)87 protected SymbolicRegressionPhenotypicDiversityAnalyzer(SymbolicRegressionPhenotypicDiversityAnalyzer original, Cloner cloner) 86 88 : base(original, cloner) { 87 89 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs
r12100 r12103 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 using HeuristicLab.Analysis; 24 23 using HeuristicLab.Common; 25 24 using HeuristicLab.Core; 26 using HeuristicLab.Optimization;27 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 26 … … 34 32 protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(bool deserializing) : base(deserializing) { } 35 33 36 pr ivateSymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicDataAnalysisBottomUpDiversityAnalyzer original, Cloner cloner)34 protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicDataAnalysisBottomUpDiversityAnalyzer original, Cloner cloner) 37 35 : base(original, cloner) { 38 36 } … … 42 40 } 43 41 44 public SymbolicDataAnalysisBottomUpDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators) 45 : base(validSimilarityCalculators) { 42 public SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicExpressionTreeBottomUpSimilarityCalculator similarityCalculator) 43 : base(new[] { similarityCalculator }) { 44 DiversityResultName = "Genotypic Diversity"; 46 45 UpdateCounterParameter.ActualName = "GenotypicDiversityAnalyzerUpdateCounter"; 47 46 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs
r12012 r12103 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, -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r11915 r12103 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" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r12069 r12103 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 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r12070 r12103 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; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
r12070 r12103 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.