Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5906


Ignore:
Timestamp:
03/31/11 11:22:28 (13 years ago)
Author:
mkommend
Message:

#1411: Reverted changesets regarding the number of evaluated nodes.

Location:
trunk/sources
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System.Linq;
    2322using System.Collections.Generic;
    2423using HeuristicLab.Common;
     
    5049      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5150      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    52       AddEvaluatedNodes(solution.Length * rows.Count());
    5351      return base.Apply();
    5452    }
     
    6765      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6866      EstimationLimitsParameter.ExecutionContext = context;
    69       EvaluatedNodesParameter.ExecutionContext = context;
    7067
    7168      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    72       AddEvaluatedNodes(tree.Length * rows.Count());
    7369
    7470      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7571      EstimationLimitsParameter.ExecutionContext = null;
    76       EvaluatedNodesParameter.ExecutionContext = null;
    7772
    7873      return quality;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5894 r5906  
    1 using System;
    2 using System.Linq;
    3 using System.Collections.Generic;
     1using System.Collections.Generic;
    42using HeuristicLab.Common;
    53using HeuristicLab.Core;
     
    3028      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    3129      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    32       AddEvaluatedNodes(solution.Length * rows.Count());
    3330      return base.Apply();
    3431    }
     
    4744      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    4845      EstimationLimitsParameter.ExecutionContext = context;
    49       EvaluatedNodesParameter.ExecutionContext = context;
    5046
    5147      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    52       AddEvaluatedNodes(tree.Length * rows.Count());
    53      
     48
    5449      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    5550      EstimationLimitsParameter.ExecutionContext = null;
    56       EvaluatedNodesParameter.ExecutionContext = null;
    5751
    5852      return quality;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r5894 r5906  
    4949      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    51       AddEvaluatedNodes(solution.Length * rows.Count());
    5251      return base.Apply();
    5352    }
     
    9089      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    9190      EstimationLimitsParameter.ExecutionContext = context;
    92       EvaluatedNodesParameter.ExecutionContext = context;
    9391
    9492      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    95       AddEvaluatedNodes(tree.Length * rows.Count());
    9693
    9794      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    9895      EstimationLimitsParameter.ExecutionContext = null;
    99       EvaluatedNodesParameter.ExecutionContext = null;
    10096
    10197      return mse;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System.Linq;
    2322using System.Collections.Generic;
    2423using HeuristicLab.Common;
     
    5049      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5150      QualityParameter.ActualValue = new DoubleValue(quality);
    52       AddEvaluatedNodes(solution.Length * rows.Count());
    5351      return base.Apply();
    5452    }
     
    6765      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6866      EstimationLimitsParameter.ExecutionContext = context;
    69       EvaluatedNodesParameter.ExecutionContext = context;
    7067
    7168      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    72       AddEvaluatedNodes(tree.Length * rows.Count());
    7369
    7470      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7571      EstimationLimitsParameter.ExecutionContext = null;
    76       EvaluatedNodesParameter.ExecutionContext = null;
    7772
    7873      return mse;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System;
    23 using System.Linq;
    2422using System.Collections.Generic;
    2523using HeuristicLab.Common;
     
    5149      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5250      QualityParameter.ActualValue = new DoubleValue(quality);
    53       AddEvaluatedNodes(solution.Length * rows.Count());
    5451      return base.Apply();
    5552    }
     
    6764      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6865      EstimationLimitsParameter.ExecutionContext = context;
    69       EvaluatedNodesParameter.ExecutionContext = context;
    7066
    7167      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    72       AddEvaluatedNodes(tree.Length * rows.Count());
    7368
    7469      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7570      EstimationLimitsParameter.ExecutionContext = null;
    76       EvaluatedNodesParameter.ExecutionContext = null;
    7771
    7872      return r2;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System.Linq;
    2322using System.Collections.Generic;
    2423using HeuristicLab.Common;
     
    5049      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5150      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    52       AddEvaluatedNodes(solution.Length * rows.Count());
    5351      return base.Apply();
    5452    }
     
    6765      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6866      EstimationLimitsParameter.ExecutionContext = context;
    69       EvaluatedNodesParameter.ExecutionContext = context;
    7067
    7168      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    72       AddEvaluatedNodes(tree.Length * rows.Count());
    7369
    7470      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7571      EstimationLimitsParameter.ExecutionContext = null;
    76       EvaluatedNodesParameter.ExecutionContext = null;
    7772
    7873      return quality;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System;
    23 using System.Linq;
    2422using System.Collections.Generic;
    2523using HeuristicLab.Common;
     
    5149      double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5250      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    53       AddEvaluatedNodes(solution.Length * rows.Count());
    5451      return base.Apply();
    5552    }
     
    6764      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6865      EstimationLimitsParameter.ExecutionContext = context;
    69       EvaluatedNodesParameter.ExecutionContext = context;
    7066
    7167      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    72       AddEvaluatedNodes(tree.Length * rows.Count());
    7368
    7469      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7570      EstimationLimitsParameter.ExecutionContext = null;
    76       EvaluatedNodesParameter.ExecutionContext = null;
    7771
    7872      return quality;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System.Linq;
    2322using System.Collections.Generic;
    2423using HeuristicLab.Common;
     
    5150      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5251      QualityParameter.ActualValue = new DoubleValue(quality);
    53       AddEvaluatedNodes(solution.Length * rows.Count());
    5452
    5553      return base.Apply();
     
    6967      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    7068      EstimationLimitsParameter.ExecutionContext = context;
    71       EvaluatedNodesParameter.ExecutionContext = context;
    7269
    7370      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    7471
    75       AddEvaluatedNodes(tree.Length * rows.Count());
    7672
    7773      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7874      EstimationLimitsParameter.ExecutionContext = null;
    79       EvaluatedNodesParameter.ExecutionContext = null;
    8075
    8176      return mse;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs

    r5894 r5906  
    2020#endregion
    2121
    22 using System;
    23 using System.Linq;
    2422using System.Collections.Generic;
    2523using HeuristicLab.Common;
     
    5250      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5351      QualityParameter.ActualValue = new DoubleValue(quality);
    54       AddEvaluatedNodes(solution.Length * rows.Count());
    5552
    5653      return base.Apply();
     
    6966      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    7067      EstimationLimitsParameter.ExecutionContext = context;
    71       EvaluatedNodesParameter.ExecutionContext = context;
    7268
    7369      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    74       AddEvaluatedNodes(tree.Length * rows.Count());
    7570
    7671      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7772      EstimationLimitsParameter.ExecutionContext = null;
    78       EvaluatedNodesParameter.ExecutionContext = null;
    7973
    8074      return r2;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r5864 r5906  
    4444    private const string EvaluationPartitionParameterName = "EvaluationPartition";
    4545    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
    46     private const string EvaluatedNodesParameterName = "EvaluatedNodes";
    4746
    4847    public override bool CanChangeName { get { return false; } }
     
    5756    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
    5857      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    59     }
    60     public ILookupParameter<DoubleValue> EvaluatedNodesParameter {
    61       get { return (ILookupParameter<DoubleValue>)Parameters[EvaluatedNodesParameterName]; }
    6258    }
    6359    public IValueLookupParameter<T> ProblemDataParameter {
     
    8783      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
    8884      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));
    89       Parameters.Add(new LookupParameter<DoubleValue>(EvaluatedNodesParameterName, "The total number of evaluated symbolic expression tree nodes."));
    9085      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
    9186      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
     
    107102        .Where(i => i < testPartitionStart || testPartitionEnd <= i);
    108103    }
    109 
    110     protected void AddEvaluatedNodes(double numberOfNodes) {
    111       if (EvaluatedNodesParameter.ActualValue == null) {
    112         // variable for evaluated nodes does not exist yet
    113         // search global scope
    114         var scope = ExecutionContext.Scope;
    115         while (scope.Parent != null) scope = scope.Parent;
    116         // add variable into global scope
    117         scope.Variables.Add(new HeuristicLab.Core.Variable(EvaluatedNodesParameter.ActualName, new DoubleValue()));
    118       }
    119       double curEvaluatedNodes = EvaluatedNodesParameter.ActualValue.Value;
    120       EvaluatedNodesParameter.ActualValue = new DoubleValue(curEvaluatedNodes + numberOfNodes);
    121     }
    122104  }
    123105}
Note: See TracChangeset for help on using the changeset viewer.