Changeset 17687 for branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
- Timestamp:
- 07/19/20 19:07:40 (4 years ago)
- Location:
- branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Property svn:mergeinfo changed
-
branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
r9456 r17687 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-2013Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Parameters; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 26 27 27 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 28 [Item("Symbolic Classification Problem (single 29 [Storable Class]30 [Creatable( "Problems")]29 [Item("Symbolic Classification Problem (single-objective)", "Represents a single objective symbolic classfication problem.")] 30 [StorableType("9C6166E7-9F34-403B-8654-22FFC77A2CAE")] 31 [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 120)] 31 32 public class SymbolicClassificationSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IClassificationProblemData, ISymbolicClassificationSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IClassificationProblem { 32 33 private const double PunishmentFactor = 10; … … 54 55 #endregion 55 56 [StorableConstructor] 56 protected SymbolicClassificationSingleObjectiveProblem( bool deserializing) : base(deserializing) { }57 protected SymbolicClassificationSingleObjectiveProblem(StorableConstructorFlag _) : base(_) { } 57 58 protected SymbolicClassificationSingleObjectiveProblem(SymbolicClassificationSingleObjectiveProblem original, Cloner cloner) 58 59 : base(original, cloner) { … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.