Changeset 5770


Ignore:
Timestamp:
03/21/11 00:19:08 (11 years ago)
Author:
mkommend
Message:

#1418: Changed data type of estimation limits and corrected some bugs.

Location:
branches/DataAnalysis Refactoring
Files:
1 added
27 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Data/3.3/StringConvertibleValueTuple.cs

    r5759 r5770  
    4747
    4848    [StorableConstructor]
    49     protected StringConvertibleValueTuple(bool deserializing) : base(deserializing) { }
     49    protected StringConvertibleValueTuple(bool deserializing)
     50      : base(deserializing) {
     51      RegisterEventHandler();
     52    }
    5053    protected StringConvertibleValueTuple(StringConvertibleValueTuple<T, U> original, Cloner cloner)
    5154      : base(original, cloner) {
     
    5356      U item2 = (U)cloner.Clone(original.values.Item2);
    5457      values = Tuple.Create<T, U>(item1, item2);
     58      RegisterEventHandler();
    5559    }
    5660
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5759 r5770  
    4646    public override IOperation Apply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    48       double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     48      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    4949      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    5050      return base.Apply();
     
    6161    public override double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) {
    6262      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    63       LowerEstimationLimitParameter.ExecutionContext = context;
    64       UpperEstimationLimitParameter.ExecutionContext = context;
     63      EstimationLimitsParameter.ExecutionContext = context;
    6564
    66       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     65      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    6766
    6867      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    69       LowerEstimationLimitParameter.ExecutionContext = null;
    70       UpperEstimationLimitParameter.ExecutionContext = null;
     68      EstimationLimitsParameter.ExecutionContext = null;
    7169
    7270      return quality;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5759 r5770  
    2626    public override IOperation Apply() {
    2727      IEnumerable<int> rows = GenerateRowsToEvaluate();
    28       double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     28      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    2929      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    3030      return base.Apply();
     
    4646    public override double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) {
    4747      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    48       LowerEstimationLimitParameter.ExecutionContext = context;
    49       UpperEstimationLimitParameter.ExecutionContext = context;
     48      EstimationLimitsParameter.ExecutionContext = context;
    5049
    51       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     50      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    5251
    5352      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    54       LowerEstimationLimitParameter.ExecutionContext = null;
    55       UpperEstimationLimitParameter.ExecutionContext = null;
     53      EstimationLimitsParameter.ExecutionContext = null;
    5654
    5755      return quality;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r5759 r5770  
    3434    private const int InitialMaximumTreeDepth = 8;
    3535    private const int InitialMaximumTreeLength = 25;
    36     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    37     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    38     private const string LowerEstimationLimitParameterDescription = "The lower limit for the estimated value that can be returned by the symbolic classification model.";
    39     private const string UpperEstimationLimitParameterDescription = "The upper limit for the estimated value that can be returned by the symbolic classification model.";
     36    private const string EstimationLimitsParameterName = "EstimationLimits";
     37    private const string EstimationLimitsParameterDescription = "The lower and upper limit for the estimated value that can be returned by the symbolic classification model.";
    4038
    4139    #region parameter properties
    42     public IFixedValueParameter<DoubleValue> LowerEstimationLimitParameter {
    43       get { return (IFixedValueParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    44     }
    45     public IFixedValueParameter<DoubleValue> UpperEstimationLimitParameter {
    46       get { return (IFixedValueParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
     40    public IFixedValueParameter<DoubleLimit> EstimationLimitsParameter {
     41      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4742    }
    4843    #endregion
    4944    #region properties
    50     public DoubleValue LowerEstimationLimit {
    51       get { return LowerEstimationLimitParameter.Value; }
    52     }
    53     public DoubleValue UpperEstimationLimit {
    54       get { return UpperEstimationLimitParameter.Value; }
     45    public DoubleLimit EstimationLimits {
     46      get { return EstimationLimitsParameter.Value; }
    5547    }
    5648    #endregion
     
    6254    public SymbolicClassificationMultiObjectiveProblem()
    6355      : base(new ClassificationProblemData(), new SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
    64       Parameters.Add(new FixedValueParameter<DoubleValue>(LowerEstimationLimitParameterName, LowerEstimationLimitParameterDescription, new DoubleValue()));
    65       Parameters.Add(new FixedValueParameter<DoubleValue>(UpperEstimationLimitParameterName, UpperEstimationLimitParameterDescription, new DoubleValue()));
     56      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription, new DoubleLimit()));
    6657
    6758      Maximization = new BoolArray(new bool[] { false, false });
     
    8475        var mean = targetValues.Average();
    8576        var range = targetValues.Max() - targetValues.Min();
    86         UpperEstimationLimit.Value = mean + PunishmentFactor * range;
    87         LowerEstimationLimit.Value = mean - PunishmentFactor * range;
     77        EstimationLimits.Upper = mean + PunishmentFactor * range;
     78        EstimationLimits.Lower = mean - PunishmentFactor * range;
    8879      }
    8980    }
     
    9687    protected new void ParameterizeOperators() {
    9788      base.ParameterizeOperators();
    98       var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
    99       foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
    100         op.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameterName;
    101         op.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameterName;
     89      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
     90        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
     91        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
     92          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameterName;
     93        }
    10294      }
    10395    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5747 r5770  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    2725using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    29 using HeuristicLab.Optimization;
    3026using HeuristicLab.Parameters;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4137    private const string ProblemDataParameterName = "ProblemData";
    4238    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    43     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    44     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     39    private const string EstimationLimitsParameterName = "EstimationLimits";
    4540    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     41
    4642    #region parameter properties
    4743    public ILookupParameter<IClassificationProblemData> ProblemDataParameter {
     
    5147      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5248    }
    53     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    54       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    55     }
    56 
    57     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    58       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     49    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     50      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    5951    }
    6052    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6254    }
    6355    #endregion
     56
    6457    #region properties
    65     public IClassificationProblemData ProblemData {
    66       get { return ProblemDataParameter.ActualValue; }
    67     }
    68     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
    69       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
    70     }
    71     public DoubleValue UpperEstimationLimit {
    72       get { return UpperEstimationLimitParameter.ActualValue; }
    73     }
    74     public DoubleValue LowerEstimationLimit {
    75       get { return LowerEstimationLimitParameter.ActualValue; }
    76     }
    7758    public BoolValue ApplyLinearScaling {
    7859      get { return ApplyLinearScalingParameter.Value; }
     
    8768      Parameters.Add(new LookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data for the symbolic classification solution."));
    8869      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    89       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic classification model."));
    90       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic classification model."));
     70      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
    9171      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    9272    }
     
    9676
    9777    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) {
    98       var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    99       var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemData);
     78      var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     79      var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemDataParameter.ActualValue);
    10080      if (ApplyLinearScaling.Value) {
    10181        solution.ScaleModel();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs

    r5759 r5770  
    3535  public sealed class SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer<ISymbolicClassificationSolution, ISymbolicClassificationMultiObjectiveEvaluator, IClassificationProblemData>,
    3636  ISymbolicDataAnalysisBoundedOperator {
    37     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    38     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     37    private const string EstimationLimitsParameterName = "EstimationLimits";
    3938    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4039
    4140    #region parameter properties
    42     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    43       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    44     }
    45     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    46       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     41    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     42      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4743    }
    4844    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6157    public SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer()
    6258      : base() {
    63       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic classification model."));
    64       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic classification model."));
     59      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The loewr and upper limit for the estimated values produced by the symbolic classification model."));
    6560      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    6661    }
     
    7065
    7166    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQualities) {
    72       var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value);
     67      var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    7368      var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemDataParameter.ActualValue);
    7469      if (ApplyLinearScaling.Value) {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r5759 r5770  
    4747    public override IOperation Apply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     49      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    5151      return base.Apply();
     
    8888
    8989    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) {
    90       return Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     90      return Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    9191    }
    9292  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5759 r5770  
    4646    public override IOperation Apply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    48       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     48      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    4949      QualityParameter.ActualValue = new DoubleValue(quality);
    5050      return base.Apply();
     
    6060    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) {
    6161      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    62       LowerEstimationLimitParameter.ExecutionContext = context;
    63       UpperEstimationLimitParameter.ExecutionContext = context;
     62      EstimationLimitsParameter.ExecutionContext = context;
    6463
    65       double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     64      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    6665
    6766      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    68       LowerEstimationLimitParameter.ExecutionContext = null;
    69       UpperEstimationLimitParameter.ExecutionContext = null;
     67      EstimationLimitsParameter.ExecutionContext = null;
    7068
    7169      return mse;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r5759 r5770  
    4747    public override IOperation Apply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     49      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    5151      return base.Apply();
     
    6666    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) {
    6767      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    68       LowerEstimationLimitParameter.ExecutionContext = context;
    69       UpperEstimationLimitParameter.ExecutionContext = context;
     68      EstimationLimitsParameter.ExecutionContext = context;
    7069
    71       double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     70      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    7271
    7372      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    74       LowerEstimationLimitParameter.ExecutionContext = null;
    75       UpperEstimationLimitParameter.ExecutionContext = null;
     73      EstimationLimitsParameter.ExecutionContext = null;
    7674
    7775      return r2;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r5759 r5770  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2524using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3433    private const int InitialMaximumTreeDepth = 8;
    3534    private const int InitialMaximumTreeLength = 25;
    36     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    37     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    38     private const string LowerEstimationLimitParameterDescription = "The lower limit for the estimated value that can be returned by the symbolic classification model.";
    39     private const string UpperEstimationLimitParameterDescription = "The upper limit for the estimated value that can be returned by the symbolic classification model.";
     35    private const string EstimationLimitsParameterName = "EstimationLimits";
     36    private const string EstimationLimitsParameterDescription = "The lower and upper limit for the estimated value that can be returned by the symbolic classification model.";
    4037
    4138    #region parameter properties
    42     public IFixedValueParameter<DoubleValue> LowerEstimationLimitParameter {
    43       get { return (IFixedValueParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    44     }
    45     public IFixedValueParameter<DoubleValue> UpperEstimationLimitParameter {
    46       get { return (IFixedValueParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
     39    public IFixedValueParameter<DoubleLimit> EstimationLimitsParameter {
     40      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4741    }
    4842    #endregion
    4943    #region properties
    50     public DoubleValue LowerEstimationLimit {
    51       get { return LowerEstimationLimitParameter.Value; }
    52     }
    53     public DoubleValue UpperEstimationLimit {
    54       get { return UpperEstimationLimitParameter.Value; }
     44    public DoubleLimit EstimationLimits {
     45      get { return EstimationLimitsParameter.Value; }
    5546    }
    5647    #endregion
     
    6253    public SymbolicClassificationSingleObjectiveProblem()
    6354      : base(new ClassificationProblemData(), new SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
    64       Parameters.Add(new FixedValueParameter<DoubleValue>(LowerEstimationLimitParameterName, LowerEstimationLimitParameterDescription, new DoubleValue()));
    65       Parameters.Add(new FixedValueParameter<DoubleValue>(UpperEstimationLimitParameterName, UpperEstimationLimitParameterDescription, new DoubleValue()));
     55      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription, new DoubleLimit()));
    6656
    6757      MaximumSymbolicExpressionTreeDepth.Value = InitialMaximumTreeDepth;
     
    8474        var mean = targetValues.Average();
    8575        var range = targetValues.Max() - targetValues.Min();
    86         UpperEstimationLimit.Value = mean + PunishmentFactor * range;
    87         LowerEstimationLimit.Value = mean - PunishmentFactor * range;
     76        EstimationLimits.Upper = mean + PunishmentFactor * range;
     77        EstimationLimits.Lower = mean - PunishmentFactor * range;
    8878      }
    8979    }
     
    9686    protected override void ParameterizeOperators() {
    9787      base.ParameterizeOperators();
    98       var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
    99       foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
    100         op.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameterName;
    101         op.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameterName;
     88      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
     89        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
     90        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
     91          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
     92        }
    10293      }
    10394    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r5736 r5770  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    2725using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    29 using HeuristicLab.Optimization;
    3026using HeuristicLab.Parameters;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4137    private const string ProblemDataParameterName = "ProblemData";
    4238    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    43     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    44     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     39    private const string EstimationLimitsParameterName = "UpperEstimationLimit";
    4540    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4641    #region parameter properties
     
    5146      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5247    }
    53     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    54       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    55     }
    56 
    57     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    58       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     48    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     49      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    5950    }
    6051    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6354    #endregion
    6455    #region properties
    65     public IClassificationProblemData ProblemData {
    66       get { return ProblemDataParameter.ActualValue; }
    67     }
    68     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
    69       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
    70     }
    71     public DoubleValue UpperEstimationLimit {
    72       get { return UpperEstimationLimitParameter.ActualValue; }
    73     }
    74     public DoubleValue LowerEstimationLimit {
    75       get { return LowerEstimationLimitParameter.ActualValue; }
    76     }
    7756    public BoolValue ApplyLinearScaling {
    7857      get { return ApplyLinearScalingParameter.Value; }
     
    8766      Parameters.Add(new LookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data for the symbolic classification solution."));
    8867      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    89       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic classification model."));
    90       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic classification model."));
     68      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
    9169      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    9270    }
     
    9674
    9775    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    98       var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    99       var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemData);
     76      var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     77      var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemDataParameter.ActualValue);
    10078      if (ApplyLinearScaling.Value) {
    10179        solution.ScaleModel();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer.cs

    r5759 r5770  
    3535  public sealed class SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<ISymbolicClassificationSolution, ISymbolicClassificationSingleObjectiveEvaluator, IClassificationProblemData>,
    3636  ISymbolicDataAnalysisBoundedOperator {
    37     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    38     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     37    private const string EstimationLimitsParameterName = "EstimationLimits";
    3938    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4039
    4140    #region parameter properties
    42     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    43       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    44     }
    45     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    46       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     41    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     42      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4743    }
    4844    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6157    public SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer()
    6258      : base() {
    63       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic classification model."));
    64       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic classification model."));
     59      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
    6560      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    6661    }
     
    7065
    7166    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    72       var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value);
     67      var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    7368      var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemDataParameter.ActualValue);
    7469      if (ApplyLinearScaling.Value) {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5759 r5770  
    4646    public override Core.IOperation Apply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    48       double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     48      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    4949      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    5050      return base.Apply();
     
    6161    public override double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
    6262      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    63       LowerEstimationLimitParameter.ExecutionContext = context;
    64       UpperEstimationLimitParameter.ExecutionContext = context;
     63      EstimationLimitsParameter.ExecutionContext = context;
    6564
    66       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     65      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    6766
    6867      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    69       LowerEstimationLimitParameter.ExecutionContext = null;
    70       UpperEstimationLimitParameter.ExecutionContext = null;
     68      EstimationLimitsParameter.ExecutionContext = null;
    7169
    7270      return quality;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5759 r5770  
    4747    public override IOperation Apply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     49      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5050      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    5151      return base.Apply();
     
    6767    public override double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
    6868      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    69       LowerEstimationLimitParameter.ExecutionContext = context;
    70       UpperEstimationLimitParameter.ExecutionContext = context;
     69      EstimationLimitsParameter.ExecutionContext = context;
    7170
    72       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     71      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    7372
    7473      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    75       LowerEstimationLimitParameter.ExecutionContext = null;
    76       UpperEstimationLimitParameter.ExecutionContext = null;
     74      EstimationLimitsParameter.ExecutionContext = null;
    7775
    7876      return quality;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r5759 r5770  
    3535    private const int InitialMaximumTreeDepth = 8;
    3636    private const int InitialMaximumTreeLength = 25;
    37     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    38     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    39     private const string LowerEstimationLimitParameterDescription = "The lower limit for the estimated value that can be returned by the symbolic regression model.";
    40     private const string UpperEstimationLimitParameterDescription = "The upper limit for the estimated value that can be returned by the symbolic regression model.";
     37    private const string EstimationLimitsParameterName = "EstimationLimits";
     38    private const string EstimationLimitsParameterDescription = "The lower and upper limit for the estimated value that can be returned by the symbolic regression model.";
    4139
    4240    #region parameter properties
    43     public IFixedValueParameter<DoubleValue> LowerEstimationLimitParameter {
    44       get { return (IFixedValueParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    45     }
    46     public IFixedValueParameter<DoubleValue> UpperEstimationLimitParameter {
    47       get { return (IFixedValueParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
     41    public IFixedValueParameter<DoubleLimit> EstimationLimitsParameter {
     42      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4843    }
    4944    #endregion
     45
    5046    #region properties
    51     public DoubleValue LowerEstimationLimit {
    52       get { return LowerEstimationLimitParameter.Value; }
     47    public DoubleLimit EstimationLimits {
     48      get { return EstimationLimitsParameter.Value; }
    5349    }
    54     public DoubleValue UpperEstimationLimit {
    55       get { return UpperEstimationLimitParameter.Value; }
    56     }
     50
    5751    #endregion
     52
    5853    [StorableConstructor]
    5954    protected SymbolicRegressionMultiObjectiveProblem(bool deserializing) : base(deserializing) { }
     
    6358    public SymbolicRegressionMultiObjectiveProblem()
    6459      : base(new RegressionProblemData(), new SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
    65       Parameters.Add(new FixedValueParameter<DoubleValue>(LowerEstimationLimitParameterName, LowerEstimationLimitParameterDescription, new DoubleValue()));
    66       Parameters.Add(new FixedValueParameter<DoubleValue>(UpperEstimationLimitParameterName, UpperEstimationLimitParameterDescription, new DoubleValue()));
     60      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription, new DoubleLimit()));
    6761
    6862      Maximization = new BoolArray(new bool[] { true, false });
     
    8579        var mean = targetValues.Average();
    8680        var range = targetValues.Max() - targetValues.Min();
    87         UpperEstimationLimit.Value = mean + PunishmentFactor * range;
    88         LowerEstimationLimit.Value = mean - PunishmentFactor * range;
     81        EstimationLimits.Upper = mean + PunishmentFactor * range;
     82        EstimationLimits.Lower = mean - PunishmentFactor * range;
    8983      }
    9084    }
     
    9791    protected override void ParameterizeOperators() {
    9892      base.ParameterizeOperators();
    99       var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
    100       foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
    101         op.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameterName;
    102         op.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameterName;
     93      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
     94        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
     95        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
     96          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
     97        }
    10398      }
    10499    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5747 r5770  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    2725using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    29 using HeuristicLab.Optimization;
    3026using HeuristicLab.Parameters;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4137    private const string ProblemDataParameterName = "ProblemData";
    4238    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    43     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    44     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     39    private const string EstimationLimitsParameterName = "EstimationLimits";
    4540    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4641    #region parameter properties
     
    5146      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5247    }
    53     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    54       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    55     }
    56 
    57     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    58       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     48    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     49      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    5950    }
    6051    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6455
    6556    #region properties
    66     public IRegressionProblemData ProblemData {
    67       get { return ProblemDataParameter.ActualValue; }
    68     }
    69     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
    70       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
    71     }
    72     public DoubleValue UpperEstimationLimit {
    73       get { return UpperEstimationLimitParameter.ActualValue; }
    74     }
    75     public DoubleValue LowerEstimationLimit {
    76       get { return LowerEstimationLimitParameter.ActualValue; }
    77     }
    7857    public BoolValue ApplyLinearScaling {
    7958      get { return ApplyLinearScalingParameter.Value; }
     
    8867      Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName, "The problem data for the symbolic regression solution."));
    8968      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    90       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic regression model."));
    91       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic regression model."));
     69      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic regression model."));
    9270      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
    9371    }
     
    9876
    9977    protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) {
    100       var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    101       var solution = new SymbolicRegressionSolution(model, ProblemData);
     78      var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     79      var solution = new SymbolicRegressionSolution(model, ProblemDataParameter.ActualValue);
    10280      if (ApplyLinearScaling.Value)
    10381        solution.ScaleModel();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs

    r5759 r5770  
    3535  public sealed class SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer<ISymbolicRegressionSolution, ISymbolicRegressionMultiObjectiveEvaluator, IRegressionProblemData>,
    3636    ISymbolicDataAnalysisBoundedOperator {
    37     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    38     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     37    private const string EstimationLimitsParameterName = "EstimationLimits";
    3938    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4039
    4140    #region parameter properties
    42     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    43       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    44     }
    45 
    46     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    47       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     41    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     42      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4843    }
    4944    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6257    public SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer()
    6358      : base() {
    64       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic regression model."));
    65       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic regression model."));
     59      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic regression model."));
    6660      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
    6761    }
     
    7165
    7266    protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) {
    73       var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value);
     67      var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    7468      var solution = new SymbolicRegressionSolution(model, ProblemDataParameter.ActualValue);
    7569      if (ApplyLinearScaling.Value)
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5759 r5770  
    4646    public override IOperation Apply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    48       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     48      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    4949      Quality = new DoubleValue(quality);
    5050      return base.Apply();
     
    6060    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
    6161      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    62       LowerEstimationLimitParameter.ExecutionContext = context;
    63       UpperEstimationLimitParameter.ExecutionContext = context;
     62      EstimationLimitsParameter.ExecutionContext = context;
    6463
    65       double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     64      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    6665
    6766      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    68       LowerEstimationLimitParameter.ExecutionContext = null;
    69       UpperEstimationLimitParameter.ExecutionContext = null;
     67      EstimationLimitsParameter.ExecutionContext = null;
    7068
    7169      return mse;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs

    r5759 r5770  
    4747    public override IOperation Apply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
     49      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5050      Quality = new DoubleValue(quality);
    5151      return base.Apply();
     
    6666    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
    6767      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    68       LowerEstimationLimitParameter.ExecutionContext = context;
    69       UpperEstimationLimitParameter.ExecutionContext = context;
     68      EstimationLimitsParameter.ExecutionContext = context;
    7069
    71       double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
     70      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    7271
    7372      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    74       LowerEstimationLimitParameter.ExecutionContext = null;
    75       UpperEstimationLimitParameter.ExecutionContext = null;
     73      EstimationLimitsParameter.ExecutionContext = null;
    7674
    7775      return r2;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r5759 r5770  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2625using HeuristicLab.Parameters;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3534    private const int InitialMaximumTreeDepth = 8;
    3635    private const int InitialMaximumTreeLength = 25;
    37     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    38     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    39     private const string LowerEstimationLimitParameterDescription = "The lower limit for the estimated value that can be returned by the symbolic regression model.";
    40     private const string UpperEstimationLimitParameterDescription = "The upper limit for the estimated value that can be returned by the symbolic regression model.";
     36    private const string EstimationLimitsParameterName = "EstimationLimits";
     37    private const string EstimationLimitsParameterDescription = "The limits for the estimated value that can be returned by the symbolic regression model.";
    4138
    4239    #region parameter properties
    43     public IFixedValueParameter<DoubleValue> LowerEstimationLimitParameter {
    44       get { return (IFixedValueParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    45     }
    46     public IFixedValueParameter<DoubleValue> UpperEstimationLimitParameter {
    47       get { return (IFixedValueParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
     40    public IFixedValueParameter<DoubleLimit> EstimationLimitsParameter {
     41      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4842    }
    4943    #endregion
    5044    #region properties
    51     public DoubleValue LowerEstimationLimit {
    52       get { return LowerEstimationLimitParameter.Value; }
    53     }
    54     public DoubleValue UpperEstimationLimit {
    55       get { return UpperEstimationLimitParameter.Value; }
     45    public DoubleLimit EstimationLimits {
     46      get { return EstimationLimitsParameter.Value; }
    5647    }
    5748    #endregion
     
    6354    public SymbolicRegressionSingleObjectiveProblem()
    6455      : base(new RegressionProblemData(), new SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
    65       Parameters.Add(new FixedValueParameter<DoubleValue>(LowerEstimationLimitParameterName, LowerEstimationLimitParameterDescription, new DoubleValue()));
    66       Parameters.Add(new FixedValueParameter<DoubleValue>(UpperEstimationLimitParameterName, UpperEstimationLimitParameterDescription, new DoubleValue()));
     56      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription, new DoubleLimit()));
    6757
    6858      Maximization.Value = true;
     
    8676        var mean = targetValues.Average();
    8777        var range = targetValues.Max() - targetValues.Min();
    88         UpperEstimationLimit.Value = mean + PunishmentFactor * range;
    89         LowerEstimationLimit.Value = mean - PunishmentFactor * range;
     78        EstimationLimits.Upper = mean + PunishmentFactor * range;
     79        EstimationLimits.Lower = mean - PunishmentFactor * range;
    9080      }
    9181    }
     
    9888    protected override void ParameterizeOperators() {
    9989      base.ParameterizeOperators();
    100       var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
    101       foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
    102         op.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameterName;
    103         op.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameterName;
     90      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
     91        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
     92        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
     93          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
     94        }
    10495      }
    10596    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r5747 r5770  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    2725using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    29 using HeuristicLab.Optimization;
    3026using HeuristicLab.Parameters;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4137    private const string ProblemDataParameterName = "ProblemData";
    4238    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    43     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    44     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     39    private const string EstimationLimitsParameterName = "EstimationLimits";
    4540    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4641    #region parameter properties
     
    5146      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5247    }
    53     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    54       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    55     }
    56 
    57     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    58       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     48    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     49      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    5950    }
    6051    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6455
    6556    #region properties
    66     public IRegressionProblemData ProblemData {
    67       get { return ProblemDataParameter.ActualValue; }
    68     }
    69     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
    70       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
    71     }
    72     public DoubleValue UpperEstimationLimit {
    73       get { return UpperEstimationLimitParameter.ActualValue; }
    74     }
    75     public DoubleValue LowerEstimationLimit {
    76       get { return LowerEstimationLimitParameter.ActualValue; }
    77     }
    7857    public BoolValue ApplyLinearScaling {
    7958      get { return ApplyLinearScalingParameter.Value; }
    8059    }
    8160    #endregion
     61
    8262    [StorableConstructor]
    8363    private SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
     
    8767      Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName, "The problem data for the symbolic regression solution."));
    8868      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    89       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic regression model."));
    90       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic regression model."));
     69      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic regression model."));
    9170      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
    9271    }
     
    9675
    9776    protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    98       var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    99       var solution = new SymbolicRegressionSolution(model, ProblemData);
     77      var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     78      var solution = new SymbolicRegressionSolution(model, ProblemDataParameter.ActualValue);
    10079      if (ApplyLinearScaling.Value)
    10180        solution.ScaleModel();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer.cs

    r5759 r5770  
    3535  public sealed class SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<ISymbolicRegressionSolution, ISymbolicRegressionSingleObjectiveEvaluator, IRegressionProblemData>,
    3636    ISymbolicDataAnalysisBoundedOperator {
    37     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    38     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     37    private const string EstimationLimitsParameterName = "EstimationLimits";
    3938    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     39
    4040    #region parameter properties
    41     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    42       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    43     }
    44 
    45     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    46       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     41    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     42      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4743    }
    4844    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6258    public SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer()
    6359      : base() {
    64       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic regression model."));
    65       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic regression model."));
     60      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic regression model."));
    6661      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
    6762    }
     
    7267
    7368    protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    74       var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value);
     69      var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    7570      var solution = new SymbolicRegressionSolution(model, ProblemDataParameter.ActualValue);
    7671      if (ApplyLinearScaling.Value)
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r5759 r5770  
    4141    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
    4242    private const string ProblemDataParameterName = "ProblemData";
    43     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    44     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     43    private const string EstimationLimitsParameterName = "EstimationLimits";
    4544    private const string EvaluationPartitionParameterName = "EvaluationPartition";
    4645    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
     
    6564      get { return (IValueLookupParameter<IntRange>)Parameters[EvaluationPartitionParameterName]; }
    6665    }
    67 
    68     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    69       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
     66    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     67      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    7068    }
    71     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    72       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    73     }
    74 
    7569    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
    7670      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
     
    9185      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
    9286      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
    93       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic data analysis trees."));
    94       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
     87      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
    9588      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
    9689    }
     
    10497      int count = (int)((samplesEnd - samplesStart) * RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
    10598      if (count == 0) count = 1;
    106       return RandomEnumerable.SampleRandomNumbers(seed, samplesEnd, samplesStart, count)
     99      return RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count)
    107100        .Where(i => i < ProblemDataParameter.ActualValue.TestPartition.Start || ProblemDataParameter.ActualValue.TestPartition.End <= i);
    108101    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisBoundedOperator.cs

    r5720 r5770  
    2020#endregion
    2121
    22 
    2322using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2523namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    2624  public interface ISymbolicDataAnalysisBoundedOperator : IOperator {
    27     IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter { get; }
    28     IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter { get; }
     25    IValueLookupParameter<DoubleLimit> EstimationLimitsParameter { get; }
    2926  }
    3027}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r5759 r5770  
    3333using HeuristicLab.PluginInfrastructure;
    3434
    35 //TODO configure training start / end
    36 //TODO configure analyzer validation
    37 
    3835namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    3936  [StorableClass]
     
    4239    where U : class, ISymbolicDataAnalysisEvaluator<T>
    4340    where V : class, ISymbolicDataAnalysisSolutionCreator {
     41
    4442    #region parameter names & descriptions
    4543    private const string ProblemDataParameterName = "ProblemData";
     
    174172      SymbolicExpressionTreeInterpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
    175173
     174      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
     175      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
     176
    176177      InitializeOperators();
    177178
     
    240241    public event EventHandler ProblemDataChanged;
    241242    protected virtual void OnProblemDataChanged() {
     243      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
     244      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
     245
    242246      UpdateGrammar();
    243247      ParameterizeOperators();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/DoubleLimitView.Designer.cs

    r5769 r5770  
    1919 */
    2020#endregion
    21 namespace HeuristicLab.Data.Views {
    22   public partial class DoubleRangeView {
     21namespace HeuristicLab.Problems.DataAnalysis.Views {
     22  public partial class DoubleLimitView {
    2323    /// <summary>
    2424    /// Required designer variable.
     
    4848      // Item1Label
    4949      //
    50       this.Item1Label.Size = new System.Drawing.Size(32, 13);
    51       this.Item1Label.Text = "Start:";
     50      this.Item1Label.Size = new System.Drawing.Size(39, 13);
     51      this.Item1Label.Text = "Lower:";
    5252      //
    5353      // Item2Label
    5454      //
    55       this.Item2Label.Size = new System.Drawing.Size(29, 13);
    56       this.Item2Label.Text = "End:";
     55      this.Item2Label.Size = new System.Drawing.Size(39, 13);
     56      this.Item2Label.Text = "Upper:";
    5757      //
    58       // IntRangeView
     58      // DoubleLimitView
    5959      //
    6060      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    61       this.Name = "IntRangeView";
     61      this.Name = "DoubleLimitView";
    6262      this.ResumeLayout(false);
    6363      this.PerformLayout();
     64
    6465    }
    6566
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/DoubleLimitView.cs

    r5769 r5770  
    2121
    2222using System.Windows.Forms;
     23using HeuristicLab.Data.Views;
    2324using HeuristicLab.MainForm;
    2425using HeuristicLab.MainForm.WindowsForms;
    2526
    26 namespace HeuristicLab.Data.Views {
     27namespace HeuristicLab.Problems.DataAnalysis.Views {
    2728  [View("DoubleRange View")]
    28   [Content(typeof(DoubleRange), true)]
    29   public partial class DoubleRangeView : StringConvertibleValueTupleView {
     29  [Content(typeof(DoubleLimit), true)]
     30  public partial class DoubleLimitView : StringConvertibleValueTupleView {
    3031
    31     public new DoubleRange Content {
    32       get { return (DoubleRange)base.Content; }
     32    public new DoubleLimit Content {
     33      get { return (DoubleLimit)base.Content; }
    3334      set { base.Content = value; }
    3435    }
    3536
    36     public DoubleRangeView() {
     37    public DoubleLimitView() {
    3738      InitializeComponent();
    3839    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r5694 r5770  
    146146      <DependentUpon>DataAnalysisSolutionView.cs</DependentUpon>
    147147    </Compile>
     148    <Compile Include="DoubleLimitView.cs">
     149      <SubType>UserControl</SubType>
     150    </Compile>
     151    <Compile Include="DoubleLimitView.Designer.cs">
     152      <DependentUpon>DoubleLimitView.cs</DependentUpon>
     153    </Compile>
    148154    <Compile Include="Regression\RegressionSolutionEstimatedValuesView.cs">
    149155      <SubType>UserControl</SubType>
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r5731 r5770  
    108108  </ItemGroup>
    109109  <ItemGroup>
     110    <Compile Include="DoubleLimit.cs" />
    110111    <Compile Include="Implementation\Classification\ClassificationProblemData.cs" />
    111112    <Compile Include="Implementation\Classification\ClassificationProblem.cs" />
Note: See TracChangeset for help on using the changeset viewer.