Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/05/14 09:32:21 (11 years ago)
Author:
gkronber
Message:

#2134: merged r10355 and r10432 from trunk to stable

Location:
stable
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

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

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionMeanRelativeErrorEvaluator.cs

    r10355 r10439  
    3030
    3131namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
    32   [Item("Mean relative error Evaluator", "Evaluator for symbolic regression models that calculates the mean relative error avg(|y'-y| / |y|+1)." +
     32  [Item("Mean relative error Evaluator", "Evaluator for symbolic regression models that calculates the mean relative error avg( |y' - y| / (|y| + 1))." +
    3333                                         "The +1 is necessary to handle data with the value of 0.0 correctly. " +
    3434                                         "Notice: Linear scaling is ignored for this evaluator.")]
     
    5050      IEnumerable<int> rows = GenerateRowsToEvaluate();
    5151
    52       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
     52      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
    5353      QualityParameter.ActualValue = new DoubleValue(quality);
    5454
     
    5656    }
    5757
    58     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows, bool applyLinearScaling) {
     58    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
    5959      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    6060      IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
     
    7575      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    7676      EstimationLimitsParameter.ExecutionContext = context;
    77       ApplyLinearScalingParameter.ExecutionContext = context;
    7877
    79       double mre = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value);
     78      double mre = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
    8079
    8180      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    8281      EstimationLimitsParameter.ExecutionContext = null;
    83       ApplyLinearScalingParameter.ExecutionContext = null;
    8482
    8583      return mre;
Note: See TracChangeset for help on using the changeset viewer.