Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8646 for trunk/sources


Ignore:
Timestamp:
09/13/12 17:38:12 (12 years ago)
Author:
mkommend
Message:

#1924: Corrected Pearson's R² evaluator for classification (estimated values were not limited in quality calculation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r7259 r8646  
    5555      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5656      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
     57      IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    5758      OnlineCalculatorError errorState;
    58       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
     59      double r2 = OnlinePearsonsRSquaredCalculator.Calculate(boundedEstimationValues, originalValues, out errorState);
    5960      if (errorState != OnlineCalculatorError.None) return 0.0;
    6061      else return r2;
Note: See TracChangeset for help on using the changeset viewer.