Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/12 08:27:57 (12 years ago)
Author:
gkronber
Message:

#1788 changed symbolic regression evaluators to bound estimated values after scaling instead of before.

File:
1 edited

Legend:

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

    r7677 r8113  
    5656      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5757      IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
    58       IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    5958      OnlineCalculatorError errorState;
    6059
     
    6261      if (applyLinearScaling) {
    6362        var maeCalculator = new OnlineMaxAbsoluteErrorCalculator();
    64         CalculateWithScaling(targetValues, boundedEstimatedValues, maeCalculator, problemData.Dataset.Rows);
     63        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, maeCalculator, problemData.Dataset.Rows);
    6564        errorState = maeCalculator.ErrorState;
    6665        mse = maeCalculator.MaxAbsoluteError;
    67       } else
     66      } else {
     67        IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    6868        mse = OnlineMaxAbsoluteErrorCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
    69 
     69      }
    7070      if (errorState != OnlineCalculatorError.None) return Double.NaN;
    7171      else return mse;
Note: See TracChangeset for help on using the changeset viewer.