Changeset 18107 for trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective
- Timestamp:
- 12/08/21 15:37:43 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/ShapeConstrainedRegressionSingleObjectiveProblem.cs
r17964 r18107 28 28 [StorableType("B35ADCA7-E902-4BEE-9DDE-DF8BBC1E27FE")] 29 29 [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 150)] 30 public class ShapeConstrainedRegressionSingleObjectiveProblem : SymbolicRegressionSingleObjectiveProblem {30 public class ShapeConstrainedRegressionSingleObjectiveProblem : SymbolicRegressionSingleObjectiveProblem, IShapeConstrainedRegressionProblem { 31 31 [StorableConstructor] 32 32 protected ShapeConstrainedRegressionSingleObjectiveProblem(StorableConstructorFlag _) : base(_) { } … … 34 34 public override IDeepCloneable Clone(Cloner cloner) { return new ShapeConstrainedRegressionSingleObjectiveProblem(this, cloner); } 35 35 36 public ShapeConstrainedRegressionProblemData ShapeConstrainedRegressionProblemData { 37 get => (ShapeConstrainedRegressionProblemData)ProblemData; 38 set => ProblemData = value; 39 } 36 40 public ShapeConstrainedRegressionSingleObjectiveProblem() 37 41 : base(new ShapeConstrainedRegressionProblemData(), new NMSESingleObjectiveConstraintsEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) { … … 51 55 52 56 public override void Load(IRegressionProblemData data) { 53 var scProblemData = new ShapeConstrainedRegressionProblemData(data.Dataset, data.AllowedInputVariables, data.TargetVariable, 54 data.TrainingPartition, data.TestPartition) { 55 Name = data.Name, 56 Description = data.Description 57 }; 57 if (data is ShapeConstrainedRegressionProblemData scProblemData) { 58 } else { 59 scProblemData = new ShapeConstrainedRegressionProblemData(data.Dataset, data.AllowedInputVariables, data.TargetVariable, 60 data.TrainingPartition, data.TestPartition) { 61 Name = data.Name, 62 Description = data.Description 63 }; 64 } 58 65 59 66 base.Load(scProblemData);
Note: See TracChangeset
for help on using the changeset viewer.