Changeset 12086
- Timestamp:
- 02/26/15 15:33:40 (10 years ago)
- Location:
- branches/SymbolicExpressionTreeDiversityAnalyzers
- Files:
-
- 10 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
r12029 r12086 186 186 <Compile Include="ModelCreators\NormalDistributedThresholdsModelCreator.cs" /> 187 187 <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" /> 188 <Compile Include="S ingleObjective\SymbolicClassificationPhenotypicDiversityAnalyzer.cs" />188 <Compile Include="SymbolicClassificationPhenotypicDiversityAnalyzer.cs" /> 189 189 <Compile Include="SymbolicClassificationPruningAnalyzer.cs" /> 190 190 <Compile Include="SymbolicClassificationSolutionImpactValuesCalculator.cs" /> -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
r12012 r12086 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>()) { 110 DiversityResultName = "Phenotypic Diversity" 111 }); 107 112 ParameterizeOperators(); 108 113 } … … 135 140 op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name; 136 141 } 142 143 foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) { 144 op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 145 op.QualityVariableName = Evaluator.QualitiesParameter.ActualName; 146 147 if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) { 148 var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op; 149 phenotypicSimilarityCalculator.ProblemData = ProblemData; 150 phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter; 151 } 152 } 137 153 } 138 154 } -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
r12075 r12086 149 149 } 150 150 151 foreach (var op in Operators.OfType<IS ingleObjectiveSolutionSimilarityCalculator>()) {151 foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) { 152 152 op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 153 153 op.QualityVariableName = Evaluator.QualityParameter.ActualName; -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs
r12079 r12086 76 76 #endregion 77 77 78 public SymbolicClassificationPhenotypicDiversityAnalyzer(IEnumerable<IS ingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)78 public SymbolicClassificationPhenotypicDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators) 79 79 : base(validSimilarityCalculators) { 80 80 #region add parameters … … 123 123 var evaluatedValues = new ItemArray<DoubleArray>(trees.Length); 124 124 for (int i = 0; i < trees.Length; ++i) { 125 var model = 126 (IDiscriminantFunctionClassificationModel) 127 modelCreator.CreateSymbolicDiscriminantFunctionClassificationModel(trees[i], interpreter, 128 estimationLimits.Lower, estimationLimits.Upper); 125 var model = (IDiscriminantFunctionClassificationModel)modelCreator.CreateSymbolicDiscriminantFunctionClassificationModel(trees[i], interpreter, estimationLimits.Lower, estimationLimits.Upper); 129 126 model.RecalculateModelParameters(problemData, rows); 130 127 var values = UseClassValues ? model.GetEstimatedClassValues(ds, rows) : model.GetEstimatedValues(ds, rows); -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r12029 r12086 182 182 <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" /> 183 183 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" /> 184 <Compile Include="S ingleObjective\SymbolicRegressionPhenotypicDiversityAnalyzer.cs" />184 <Compile Include="SymbolicRegressionPhenotypicDiversityAnalyzer.cs" /> 185 185 <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" /> 186 186 <Compile Include="SymbolicRegressionPruningAnalyzer.cs" /> -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
r12012 r12086 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>()) { 98 DiversityResultName = "Phenotypic Diversity" 99 }); 95 100 ParameterizeOperators(); 96 101 } … … 122 127 } 123 128 } 129 130 foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) { 131 op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 132 op.QualityVariableName = Evaluator.QualitiesParameter.ActualName; 133 134 if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) { 135 var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op; 136 phenotypicSimilarityCalculator.ProblemData = ProblemData; 137 phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter; 138 } 139 } 124 140 } 125 141 } -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r12075 r12086 144 144 } 145 145 146 foreach (var op in Operators.OfType<IS ingleObjectiveSolutionSimilarityCalculator>()) {146 foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) { 147 147 op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 148 148 op.QualityVariableName = Evaluator.QualityParameter.ActualName; -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPhenotypicDiversityAnalyzer.cs
r12079 r12086 61 61 #endregion 62 62 63 public SymbolicRegressionPhenotypicDiversityAnalyzer(IEnumerable<IS ingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)63 public SymbolicRegressionPhenotypicDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators) 64 64 : base(validSimilarityCalculators) { 65 65 #region add parameters -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs
r12075 r12086 42 42 } 43 43 44 public SymbolicDataAnalysisBottomUpDiversityAnalyzer( 45 IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators) 44 public SymbolicDataAnalysisBottomUpDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators) 46 45 : base(validSimilarityCalculators) { 47 46 UpdateCounterParameter.ActualName = "GenotypicDiversityAnalyzerUpdateCounter"; -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r12049 r12086 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 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { } 39 40 protected override bool IsCommutative { get { return true; } } 39 41 40 42 [StorableConstructor] -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
r12028 r12086 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 : S ingleObjectiveSolutionSimilarityCalculator {32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator { 33 33 [Storable] 34 34 private readonly SymbolicExpressionTreeNodeEqualityComparer comparer; … … 42 42 set { comparer.MatchConstantValues = value; } 43 43 } 44 45 protected override bool IsCommutative { get { return true; } } 44 46 45 47 [StorableConstructor] … … 85 87 } 86 88 89 87 90 public static double MaxCommonSubtreeSimilarity(ISymbolicExpressionTree a, ISymbolicExpressionTree b, ISymbolicExpressionTreeNodeSimilarityComparer comparer) { 88 91 int max = 0; -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12068 r12086 31 31 [Item("SymbolicExpressionTreePhenotypicSimilarityCalculator", "An operator that calculates the similarity betweeon two trees based on the correlation of their outputs.")] 32 32 [StorableClass] 33 public class SymbolicExpressionTreePhenotypicSimilarityCalculator : S ingleObjectiveSolutionSimilarityCalculator {33 public class SymbolicExpressionTreePhenotypicSimilarityCalculator : SolutionSimilarityCalculator { 34 34 [Storable] 35 35 public IDataAnalysisProblemData ProblemData { get; set; } 36 36 [Storable] 37 37 public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; set; } 38 39 protected override bool IsCommutative { get { return true; } } 38 40 39 41 [StorableConstructor] … … 50 52 } 51 53 52 public SymbolicExpressionTreePhenotypicSimilarityCalculator() { 53 } 54 public SymbolicExpressionTreePhenotypicSimilarityCalculator() { } 54 55 55 56 public double CalculateSimilarity(ISymbolicExpressionTree t1, ISymbolicExpressionTree t2) {
Note: See TracChangeset
for help on using the changeset viewer.