Ignore:
Timestamp:
03/09/16 12:05:50 (5 years ago)
Author:
mkommend
Message:

#2584: Added parameter in constant optimization that determines whether variable weights should be modified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveEvaluator.cs

    r13241 r13670  
    3434    private const string ConstantOptimizationIterationsParameterName = "Constant optimization iterations";
    3535
     36    private const string ConstantOptimizationUpdateVariableWeightsParameterName =
     37      "Constant optimization update variable weights";
     38
    3639    public IFixedValueParameter<IntValue> DecimalPlacesParameter {
    3740      get { return (IFixedValueParameter<IntValue>)Parameters[DecimalPlacesParameterName]; }
     
    4548    }
    4649
     50    public IFixedValueParameter<BoolValue> ConstantOptimizationUpdateVariableWeightsParameter {
     51      get { return (IFixedValueParameter<BoolValue>)Parameters[ConstantOptimizationUpdateVariableWeightsParameterName]; }
     52    }
    4753
    4854    public int DecimalPlaces {
     
    5864      set { ConstantOptimizationIterationsParameter.Value.Value = value; }
    5965    }
     66    public bool ConstantOptimizationUpdateVariableWeights {
     67      get { return ConstantOptimizationUpdateVariableWeightsParameter.Value.Value; }
     68      set { ConstantOptimizationUpdateVariableWeightsParameter.Value.Value = value; }
     69    }
    6070
    6171    [StorableConstructor]
     
    7080      Parameters.Add(new FixedValueParameter<BoolValue>(UseConstantOptimizationParameterName, "", new BoolValue(false)));
    7181      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)));
    7283    }
    7384
     
    8394        Parameters.Add(new FixedValueParameter<IntValue>(ConstantOptimizationIterationsParameterName, "The number of iterations constant optimization should be applied.", new IntValue(5)));
    8495      }
     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)));
     98      }
    8599    }
    86100  }
Note: See TracChangeset for help on using the changeset viewer.