Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/15 09:52:09 (9 years ago)
Author:
gkronber
Message:

#2392: merged r12492 and r12641 from trunk to stable

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

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

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r12009 r12669  
    5757      OnlineCalculatorError errorState;
    5858
    59       double r2;
     59      double r;
    6060      if (applyLinearScaling) {
    61         var r2Calculator = new OnlinePearsonsRSquaredCalculator();
    62         CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r2Calculator, problemData.Dataset.Rows);
    63         errorState = r2Calculator.ErrorState;
    64         r2 = r2Calculator.RSquared;
     61        var rCalculator = new OnlinePearsonsRCalculator();
     62        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows);
     63        errorState = rCalculator.ErrorState;
     64        r = rCalculator.R;
    6565      } else {
    6666        IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    67         r2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
     67        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
    6868      }
    6969
    70       if (errorState != OnlineCalculatorError.None) r2 = double.NaN;
    71       return new double[2] { r2, solution.Length };
     70      if (errorState != OnlineCalculatorError.None) r = double.NaN;
     71      return new double[2] { r*r, solution.Length };
    7272
    7373    }
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r12009 r12669  
    5757      OnlineCalculatorError errorState;
    5858
    59       double r2;
     59      double r;
    6060      if (applyLinearScaling) {
    61         var r2Calculator = new OnlinePearsonsRSquaredCalculator();
    62         CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r2Calculator, problemData.Dataset.Rows);
    63         errorState = r2Calculator.ErrorState;
    64         r2 = r2Calculator.RSquared;
     61        var rCalculator = new OnlinePearsonsRCalculator();
     62        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows);
     63        errorState = rCalculator.ErrorState;
     64        r = rCalculator.R;
    6565      } else {
    6666        IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    67         r2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
     67        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
    6868      }
    6969      if (errorState != OnlineCalculatorError.None) return double.NaN;
    70       return r2;
     70      return r*r;
    7171    }
    7272
Note: See TracChangeset for help on using the changeset viewer.