Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/15/21 11:50:57 (3 years ago)
Author:
gkronber
Message:

#3140: merged r18091:18131 from branch to trunk

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression

  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4

  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveEvaluator.cs

    r17180 r18132  
    3131  public abstract class SymbolicRegressionMultiObjectiveEvaluator : SymbolicDataAnalysisMultiObjectiveEvaluator<IRegressionProblemData>, ISymbolicRegressionMultiObjectiveEvaluator {
    3232    private const string DecimalPlacesParameterName = "Decimal Places";
    33     private const string UseConstantOptimizationParameterName = "Use constant optimization";
    34     private const string ConstantOptimizationIterationsParameterName = "Constant optimization iterations";
     33    private const string UseParameterOptimizationParameterName = "Use parameter optimization";
     34    private const string ParameterOptimizationIterationsParameterName = "Parameter optimization iterations";
    3535
    36     private const string ConstantOptimizationUpdateVariableWeightsParameterName =
    37       "Constant optimization update variable weights";
     36    private const string ParameterOptimizationUpdateVariableWeightsParameterName =
     37      "Parameter optimization update variable weights";
    3838
    3939    public IFixedValueParameter<IntValue> DecimalPlacesParameter {
    4040      get { return (IFixedValueParameter<IntValue>)Parameters[DecimalPlacesParameterName]; }
    4141    }
    42     public IFixedValueParameter<BoolValue> UseConstantOptimizationParameter {
    43       get { return (IFixedValueParameter<BoolValue>)Parameters[UseConstantOptimizationParameterName]; }
     42    public IFixedValueParameter<BoolValue> UseParameterOptimizationParameter {
     43      get { return (IFixedValueParameter<BoolValue>)Parameters[UseParameterOptimizationParameterName]; }
    4444    }
    4545
    46     public IFixedValueParameter<IntValue> ConstantOptimizationIterationsParameter {
    47       get { return (IFixedValueParameter<IntValue>)Parameters[ConstantOptimizationIterationsParameterName]; }
     46    public IFixedValueParameter<IntValue> ParameterOptimizationIterationsParameter {
     47      get { return (IFixedValueParameter<IntValue>)Parameters[ParameterOptimizationIterationsParameterName]; }
    4848    }
    4949
    50     public IFixedValueParameter<BoolValue> ConstantOptimizationUpdateVariableWeightsParameter {
    51       get { return (IFixedValueParameter<BoolValue>)Parameters[ConstantOptimizationUpdateVariableWeightsParameterName]; }
     50    public IFixedValueParameter<BoolValue> ParameterOptimizationUpdateVariableWeightsParameter {
     51      get { return (IFixedValueParameter<BoolValue>)Parameters[ParameterOptimizationUpdateVariableWeightsParameterName]; }
    5252    }
    5353
     
    5656      set { DecimalPlacesParameter.Value.Value = value; }
    5757    }
    58     public bool UseConstantOptimization {
    59       get { return UseConstantOptimizationParameter.Value.Value; }
    60       set { UseConstantOptimizationParameter.Value.Value = value; }
     58    public bool UseParameterOptimization {
     59      get { return UseParameterOptimizationParameter.Value.Value; }
     60      set { UseParameterOptimizationParameter.Value.Value = value; }
    6161    }
    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; }
    6565    }
    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; }
    6969    }
    7070
     
    7878      : base() {
    7979      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>(UseConstantOptimizationParameterName, "", new BoolValue(false)));
    81       Parameters.Add(new FixedValueParameter<IntValue>(ConstantOptimizationIterationsParameterName, "The number of iterations constant optimization 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 constant optimization.", 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 });
    8383    }
    8484
    8585    [StorableHook(HookType.AfterDeserialization)]
    8686    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        }
    8994      }
     95
    9096      if (!Parameters.ContainsKey(DecimalPlacesParameterName)) {
    9197        Parameters.Add(new FixedValueParameter<IntValue>(DecimalPlacesParameterName, "The number of decimal places used for rounding the quality values.", new IntValue(-1)) { Hidden = true });
    9298      }
    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        }
    95106      }
    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        }
    98115      }
    99116    }
Note: See TracChangeset for help on using the changeset viewer.