Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/11 20:04:51 (14 years ago)
Author:
gkronber
Message:

#1411 added evaluated nodes parameter to symbolic data analysis evaluators.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5809 r5851  
    2020#endregion
    2121
     22using System.Linq;
    2223using System.Collections.Generic;
    2324using HeuristicLab.Common;
     
    4546
    4647    public override IOperation Apply() {
     48      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4749      IEnumerable<int> rows = GenerateRowsToEvaluate();
    48       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    49       Quality = new DoubleValue(quality);
     50
     51      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
     52      QualityParameter.ActualValue = new DoubleValue(quality);
     53      AddEvaluatedNodes(solution.Length * rows.Count());
     54
    5055      return base.Apply();
    5156    }
     
    6166      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6267      EstimationLimitsParameter.ExecutionContext = context;
     68      EvaluatedNodesParameter.ExecutionContext = context;
    6369
    6470      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    6571
     72      AddEvaluatedNodes(tree.Length * rows.Count());
     73
    6674      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    6775      EstimationLimitsParameter.ExecutionContext = null;
     76      EvaluatedNodesParameter.ExecutionContext = null;
    6877
    6978      return mse;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs

    r5846 r5851  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Collections.Generic;
    2425using HeuristicLab.Common;
     
    4647
    4748    public override IOperation Apply() {
     49      var solution = SymbolicExpressionTreeParameter.ActualValue;
    4850      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    50       Quality = new DoubleValue(quality);
     51
     52      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
     53      QualityParameter.ActualValue = new DoubleValue(quality);
     54      AddEvaluatedNodes(solution.Length * rows.Count());
     55
    5156      return base.Apply();
    5257    }
     
    6267      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6368      EstimationLimitsParameter.ExecutionContext = context;
     69      EvaluatedNodesParameter.ExecutionContext = context;
    6470
    6571      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
     72      AddEvaluatedNodes(tree.Length * rows.Count());
    6673
    6774      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    6875      EstimationLimitsParameter.ExecutionContext = null;
     76      EvaluatedNodesParameter.ExecutionContext = null;
    6977
    7078      return r2;
Note: See TracChangeset for help on using the changeset viewer.