Changeset 18132 for trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveEvaluator.cs
- Timestamp:
- 12/15/21 11:50:57 (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol (added) merged: 18091,18093,18100,18112-18121,18123-18131
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression (added) merged: 18093,18100,18113-18115,18117
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4 (added) merged: 18093,18100,18113-18115,18117
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveEvaluator.cs
r17180 r18132 31 31 public abstract class SymbolicRegressionMultiObjectiveEvaluator : SymbolicDataAnalysisMultiObjectiveEvaluator<IRegressionProblemData>, ISymbolicRegressionMultiObjectiveEvaluator { 32 32 private const string DecimalPlacesParameterName = "Decimal Places"; 33 private const string Use ConstantOptimizationParameterName = "Use constantoptimization";34 private const string ConstantOptimizationIterationsParameterName = "Constantoptimization iterations";33 private const string UseParameterOptimizationParameterName = "Use parameter optimization"; 34 private const string ParameterOptimizationIterationsParameterName = "Parameter optimization iterations"; 35 35 36 private const string ConstantOptimizationUpdateVariableWeightsParameterName =37 " Constantoptimization update variable weights";36 private const string ParameterOptimizationUpdateVariableWeightsParameterName = 37 "Parameter optimization update variable weights"; 38 38 39 39 public IFixedValueParameter<IntValue> DecimalPlacesParameter { 40 40 get { return (IFixedValueParameter<IntValue>)Parameters[DecimalPlacesParameterName]; } 41 41 } 42 public IFixedValueParameter<BoolValue> Use ConstantOptimizationParameter {43 get { return (IFixedValueParameter<BoolValue>)Parameters[Use ConstantOptimizationParameterName]; }42 public IFixedValueParameter<BoolValue> UseParameterOptimizationParameter { 43 get { return (IFixedValueParameter<BoolValue>)Parameters[UseParameterOptimizationParameterName]; } 44 44 } 45 45 46 public IFixedValueParameter<IntValue> ConstantOptimizationIterationsParameter {47 get { return (IFixedValueParameter<IntValue>)Parameters[ ConstantOptimizationIterationsParameterName]; }46 public IFixedValueParameter<IntValue> ParameterOptimizationIterationsParameter { 47 get { return (IFixedValueParameter<IntValue>)Parameters[ParameterOptimizationIterationsParameterName]; } 48 48 } 49 49 50 public IFixedValueParameter<BoolValue> ConstantOptimizationUpdateVariableWeightsParameter {51 get { return (IFixedValueParameter<BoolValue>)Parameters[ ConstantOptimizationUpdateVariableWeightsParameterName]; }50 public IFixedValueParameter<BoolValue> ParameterOptimizationUpdateVariableWeightsParameter { 51 get { return (IFixedValueParameter<BoolValue>)Parameters[ParameterOptimizationUpdateVariableWeightsParameterName]; } 52 52 } 53 53 … … 56 56 set { DecimalPlacesParameter.Value.Value = value; } 57 57 } 58 public bool Use ConstantOptimization {59 get { return Use ConstantOptimizationParameter.Value.Value; }60 set { Use ConstantOptimizationParameter.Value.Value = value; }58 public bool UseParameterOptimization { 59 get { return UseParameterOptimizationParameter.Value.Value; } 60 set { UseParameterOptimizationParameter.Value.Value = value; } 61 61 } 62 public int ConstantOptimizationIterations {63 get { return ConstantOptimizationIterationsParameter.Value.Value; }64 set { ConstantOptimizationIterationsParameter.Value.Value = value; }62 public int ParameterOptimizationIterations { 63 get { return ParameterOptimizationIterationsParameter.Value.Value; } 64 set { ParameterOptimizationIterationsParameter.Value.Value = value; } 65 65 } 66 public bool ConstantOptimizationUpdateVariableWeights {67 get { return ConstantOptimizationUpdateVariableWeightsParameter.Value.Value; }68 set { ConstantOptimizationUpdateVariableWeightsParameter.Value.Value = value; }66 public bool ParameterOptimizationUpdateVariableWeights { 67 get { return ParameterOptimizationUpdateVariableWeightsParameter.Value.Value; } 68 set { ParameterOptimizationUpdateVariableWeightsParameter.Value.Value = value; } 69 69 } 70 70 … … 78 78 : base() { 79 79 Parameters.Add(new FixedValueParameter<IntValue>(DecimalPlacesParameterName, "The number of decimal places used for rounding the quality values.", new IntValue(5)) { Hidden = true }); 80 Parameters.Add(new FixedValueParameter<BoolValue>(Use ConstantOptimizationParameterName, "", new BoolValue(false)));81 Parameters.Add(new FixedValueParameter<IntValue>( ConstantOptimizationIterationsParameterName, "The number of iterations constantoptimization should be applied.", new IntValue(5)));82 Parameters.Add(new FixedValueParameter<BoolValue>( ConstantOptimizationUpdateVariableWeightsParameterName, "Determines if the variable weights in the tree should be optimized during constantoptimization.", new BoolValue(true)) { Hidden = true });80 Parameters.Add(new FixedValueParameter<BoolValue>(UseParameterOptimizationParameterName, "", new BoolValue(false))); 81 Parameters.Add(new FixedValueParameter<IntValue>(ParameterOptimizationIterationsParameterName, "The number of iterations parameter optimization should be applied.", new IntValue(5))); 82 Parameters.Add(new FixedValueParameter<BoolValue>(ParameterOptimizationUpdateVariableWeightsParameterName, "Determines if the variable weights in the tree should be optimized during parameter optimization.", new BoolValue(true)) { Hidden = true }); 83 83 } 84 84 85 85 [StorableHook(HookType.AfterDeserialization)] 86 86 private void AfterDeserialization() { 87 if (!Parameters.ContainsKey(UseConstantOptimizationParameterName)) { 88 Parameters.Add(new FixedValueParameter<BoolValue>(UseConstantOptimizationParameterName, "", new BoolValue(false))); 87 if (!Parameters.ContainsKey(UseParameterOptimizationParameterName)) { 88 if (Parameters.ContainsKey("Use constant optimization")) { 89 Parameters.Add(new FixedValueParameter<BoolValue>(UseParameterOptimizationParameterName, "", (BoolValue)Parameters["Use constant optimization"].ActualValue)); 90 Parameters.Remove("Use constant optimization"); 91 } else { 92 Parameters.Add(new FixedValueParameter<BoolValue>(UseParameterOptimizationParameterName, "", new BoolValue(false))); 93 } 89 94 } 95 90 96 if (!Parameters.ContainsKey(DecimalPlacesParameterName)) { 91 97 Parameters.Add(new FixedValueParameter<IntValue>(DecimalPlacesParameterName, "The number of decimal places used for rounding the quality values.", new IntValue(-1)) { Hidden = true }); 92 98 } 93 if (!Parameters.ContainsKey(ConstantOptimizationIterationsParameterName)) { 94 Parameters.Add(new FixedValueParameter<IntValue>(ConstantOptimizationIterationsParameterName, "The number of iterations constant optimization should be applied.", new IntValue(5))); 99 if (!Parameters.ContainsKey(ParameterOptimizationIterationsParameterName)) { 100 if (Parameters.ContainsKey("Constant optimization iterations")) { 101 Parameters.Add(new FixedValueParameter<IntValue>(ParameterOptimizationIterationsParameterName, "The number of iterations parameter optimization should be applied.", (IntValue)Parameters["Constant optimization iterations"].ActualValue)); 102 Parameters.Remove("Constant optimization iterations"); 103 } else { 104 Parameters.Add(new FixedValueParameter<IntValue>(ParameterOptimizationIterationsParameterName, "The number of iterations parameter optimization should be applied.", new IntValue(5))); 105 } 95 106 } 96 if (!Parameters.ContainsKey(ConstantOptimizationUpdateVariableWeightsParameterName)) { 97 Parameters.Add(new FixedValueParameter<BoolValue>(ConstantOptimizationUpdateVariableWeightsParameterName, "Determines if the variable weights in the tree should be optimized during constant optimization.", new BoolValue(true))); 107 if (!Parameters.ContainsKey(ParameterOptimizationUpdateVariableWeightsParameterName)) { 108 if (Parameters.ContainsKey("Constant optimization update variable weights")) { 109 Parameters.Add(new FixedValueParameter<BoolValue>(ParameterOptimizationUpdateVariableWeightsParameterName, "Determines if the variable weights in the tree should be optimized during parameter optimization.", 110 (BoolValue)Parameters["Constant optimization update variable weights"].ActualValue)); 111 Parameters.Remove("Constant optimization update variable weights"); 112 } else { 113 Parameters.Add(new FixedValueParameter<BoolValue>(ParameterOptimizationUpdateVariableWeightsParameterName, "Determines if the variable weights in the tree should be optimized during parameter optimization.", new BoolValue(true))); 114 } 98 115 } 99 116 }
Note: See TracChangeset
for help on using the changeset viewer.