Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6961


Ignore:
Timestamp:
11/08/11 10:13:21 (13 years ago)
Author:
mkommend
Message:

#1670: Corrected calculation of DataAnalysisSolution results and modified online calculators to have more meaningful parameter names.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs

    r6913 r6961  
    8484
    8585      OnlineCalculatorError errorState;
    86       double trainingAccuracy = OnlineAccuracyCalculator.Calculate(estimatedTrainingClassValues, originalTrainingClassValues, out errorState);
     86      double trainingAccuracy = OnlineAccuracyCalculator.Calculate(originalTrainingClassValues, estimatedTrainingClassValues, out errorState);
    8787      if (errorState != OnlineCalculatorError.None) trainingAccuracy = double.NaN;
    88       double testAccuracy = OnlineAccuracyCalculator.Calculate(estimatedTestClassValues, originalTestClassValues, out errorState);
     88      double testAccuracy = OnlineAccuracyCalculator.Calculate(originalTestClassValues, estimatedTestClassValues, out errorState);
    8989      if (errorState != OnlineCalculatorError.None) testAccuracy = double.NaN;
    9090
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs

    r6913 r6961  
    108108
    109109      OnlineCalculatorError errorState;
    110       double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     110      double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    111111      TrainingMeanSquaredError = errorState == OnlineCalculatorError.None ? trainingMSE : double.NaN;
    112       double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     112      double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    113113      TestMeanSquaredError = errorState == OnlineCalculatorError.None ? testMSE : double.NaN;
    114114
    115       double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     115      double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    116116      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN;
    117       double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     117      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    118118      TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
    119119
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs

    r6740 r6961  
    147147
    148148      OnlineCalculatorError errorState;
    149       double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     149      double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    150150      TrainingMeanSquaredError = errorState == OnlineCalculatorError.None ? trainingMSE : double.NaN;
    151       double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     151      double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    152152      TestMeanSquaredError = errorState == OnlineCalculatorError.None ? testMSE : double.NaN;
    153153
    154       double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     154      double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    155155      TrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN;
    156       double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     156      double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    157157      TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN;
    158158
    159       double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     159      double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    160160      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN;
    161       double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     161      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    162162      TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
    163163
    164       double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     164      double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    165165      TrainingRelativeError = errorState == OnlineCalculatorError.None ? trainingRelError : double.NaN;
    166       double testRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     166      double testRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    167167      TestRelativeError = errorState == OnlineCalculatorError.None ? testRelError : double.NaN;
    168168
    169       double trainingNMSE = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     169      double trainingNMSE = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    170170      TrainingNormalizedMeanSquaredError = errorState == OnlineCalculatorError.None ? trainingNMSE : double.NaN;
    171       double testNMSE = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     171      double testNMSE = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    172172      TestNormalizedMeanSquaredError = errorState == OnlineCalculatorError.None ? testNMSE : double.NaN;
    173173    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs

    r6802 r6961  
    166166
    167167      OnlineCalculatorError errorState;
    168       double trainingMse = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     168      double trainingMse = OnlineMeanSquaredErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    169169      TrainingMeanSquaredError = errorState == OnlineCalculatorError.None ? trainingMse : double.NaN;
    170       double testMse = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     170      double testMse = OnlineMeanSquaredErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    171171      TestMeanSquaredError = errorState == OnlineCalculatorError.None ? testMse : double.NaN;
    172172
    173       double trainingMae = OnlineMeanAbsoluteErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     173      double trainingMae = OnlineMeanAbsoluteErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    174174      TrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMae : double.NaN;
    175       double testMae = OnlineMeanAbsoluteErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     175      double testMae = OnlineMeanAbsoluteErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    176176      TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMae : double.NaN;
    177177
    178       double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     178      double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    179179      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN;
    180       double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     180      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    181181      TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
    182182
    183       double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     183      double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    184184      TrainingRelativeError = errorState == OnlineCalculatorError.None ? trainingRelError : double.NaN;
    185       double testRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     185      double testRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    186186      TestRelativeError = errorState == OnlineCalculatorError.None ? testRelError : double.NaN;
    187187
    188       double trainingNmse = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     188      double trainingNmse = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    189189      TrainingNormalizedMeanSquaredError = errorState == OnlineCalculatorError.None ? trainingNmse : double.NaN;
    190       double testNmse = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     190      double testNmse = OnlineNormalizedMeanSquaredErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    191191      TestNormalizedMeanSquaredError = errorState == OnlineCalculatorError.None ? testNmse : double.NaN;
    192192
    193       double trainingDirectionalSymmetry = OnlineDirectionalSymmetryCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     193      double trainingDirectionalSymmetry = OnlineDirectionalSymmetryCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    194194      TrainingDirectionalSymmetry = errorState == OnlineCalculatorError.None ? trainingDirectionalSymmetry : double.NaN;
    195       double testDirectionalSymmetry = OnlineDirectionalSymmetryCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     195      double testDirectionalSymmetry = OnlineDirectionalSymmetryCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    196196      TestDirectionalSymmetry = errorState == OnlineCalculatorError.None ? testDirectionalSymmetry : double.NaN;
    197197
    198       double trainingWeightedDirectionalSymmetry = OnlineWeightedDirectionalSymmetryCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     198      double trainingWeightedDirectionalSymmetry = OnlineWeightedDirectionalSymmetryCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    199199      TrainingWeightedDirectionalSymmetry = errorState == OnlineCalculatorError.None ? trainingWeightedDirectionalSymmetry : double.NaN;
    200       double testWeightedDirectionalSymmetry = OnlineWeightedDirectionalSymmetryCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     200      double testWeightedDirectionalSymmetry = OnlineWeightedDirectionalSymmetryCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    201201      TestWeightedDirectionalSymmetry = errorState == OnlineCalculatorError.None ? testWeightedDirectionalSymmetry : double.NaN;
    202202
    203       double trainingTheilsU = OnlineTheilsUStatisticCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);
     203      double trainingTheilsU = OnlineTheilsUStatisticCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    204204      TrainingTheilsUStatistic = errorState == OnlineCalculatorError.None ? trainingTheilsU : double.NaN;
    205       double testTheilsU = OnlineTheilsUStatisticCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
     205      double testTheilsU = OnlineTheilsUStatisticCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    206206      TestTheilsUStatistic = errorState == OnlineCalculatorError.None ? testTheilsU : double.NaN;
    207207
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineAccuracyCalculator.cs

    r5945 r6961  
    6868    #endregion
    6969
    70     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
    71       IEnumerator<double> firstEnumerator = first.GetEnumerator();
    72       IEnumerator<double> secondEnumerator = second.GetEnumerator();
     70    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
     71      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
     72      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    7373      OnlineAccuracyCalculator accuracyCalculator = new OnlineAccuracyCalculator();
    7474
    7575      // always move forward both enumerators (do not use short-circuit evaluation!)
    76       while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    77         double estimated = secondEnumerator.Current;
    78         double original = firstEnumerator.Current;
     76      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
     77        double original = originalEnumerator.Current;
     78        double estimated = estimatedEnumerator.Current;
    7979        accuracyCalculator.Add(original, estimated);
    8080        if (accuracyCalculator.ErrorState != OnlineCalculatorError.None) break;
     
    8383      // check if both enumerators are at the end to make sure both enumerations have the same length
    8484      if (accuracyCalculator.ErrorState == OnlineCalculatorError.None &&
    85           (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
     85          (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())) {
    8686        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8787      } else {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsoluteErrorCalculator.cs

    r6643 r6961  
    6565    #endregion
    6666
    67     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
    68       IEnumerator<double> firstEnumerator = first.GetEnumerator();
    69       IEnumerator<double> secondEnumerator = second.GetEnumerator();
     67    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
     68      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
     69      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    7070      OnlineMeanAbsoluteErrorCalculator maeCalculator = new OnlineMeanAbsoluteErrorCalculator();
    7171
    7272      // always move forward both enumerators (do not use short-circuit evaluation!)
    73       while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    74         double estimated = secondEnumerator.Current;
    75         double original = firstEnumerator.Current;
     73      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
     74        double original = originalEnumerator.Current;
     75        double estimated = estimatedEnumerator.Current;
    7676        maeCalculator.Add(original, estimated);
    7777        if (maeCalculator.ErrorState != OnlineCalculatorError.None) break;
     
    8080      // check if both enumerators are at the end to make sure both enumerations have the same length
    8181      if (maeCalculator.ErrorState == OnlineCalculatorError.None &&
    82          (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
     82         (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())) {
    8383        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8484      } else {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsolutePercentageErrorCalculator.cs

    r5945 r6961  
    6767    #endregion
    6868
    69     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
    70       IEnumerator<double> firstEnumerator = first.GetEnumerator();
    71       IEnumerator<double> secondEnumerator = second.GetEnumerator();
     69    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
     70      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
     71      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    7272      OnlineMeanAbsolutePercentageErrorCalculator calculator = new OnlineMeanAbsolutePercentageErrorCalculator();
    7373
    7474      // always move forward both enumerators (do not use short-circuit evaluation!)
    75       while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    76         double estimated = secondEnumerator.Current;
    77         double original = firstEnumerator.Current;
     75      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
     76        double original = originalEnumerator.Current;
     77        double estimated = estimatedEnumerator.Current;
    7878        calculator.Add(original, estimated);
    7979        if (calculator.ErrorState != OnlineCalculatorError.None) break;
     
    8282      // check if both enumerators are at the end to make sure both enumerations have the same length
    8383      if (calculator.ErrorState == OnlineCalculatorError.None &&
    84             (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
     84            (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())) {
    8585        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8686      } else {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanSquaredErrorCalculator.cs

    r5945 r6961  
    6565    #endregion
    6666
    67     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
    68       IEnumerator<double> firstEnumerator = first.GetEnumerator();
    69       IEnumerator<double> secondEnumerator = second.GetEnumerator();
     67    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
     68      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
     69      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    7070      OnlineMeanSquaredErrorCalculator mseCalculator = new OnlineMeanSquaredErrorCalculator();
    7171
    7272      // always move forward both enumerators (do not use short-circuit evaluation!)
    73       while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    74         double estimated = secondEnumerator.Current;
    75         double original = firstEnumerator.Current;
     73      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
     74        double original = originalEnumerator.Current;
     75        double estimated = estimatedEnumerator.Current;
    7676        mseCalculator.Add(original, estimated);
    7777        if (mseCalculator.ErrorState != OnlineCalculatorError.None) break;
     
    8080      // check if both enumerators are at the end to make sure both enumerations have the same length
    8181      if (mseCalculator.ErrorState == OnlineCalculatorError.None &&
    82          (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
     82         (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())) {
    8383        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8484      } else {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.cs

    r5962 r6961  
    6363    #endregion
    6464
    65     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
    66       IEnumerator<double> firstEnumerator = first.GetEnumerator();
    67       IEnumerator<double> secondEnumerator = second.GetEnumerator();
     65    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
     66      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
     67      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    6868      OnlineNormalizedMeanSquaredErrorCalculator normalizedMSECalculator = new OnlineNormalizedMeanSquaredErrorCalculator();
    6969
    7070      //needed because otherwise the normalizedMSECalculator is in ErrorState.InsufficientValuesAdded
    71       if (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    72         double estimated = secondEnumerator.Current;
    73         double original = firstEnumerator.Current;
     71      if (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
     72        double original = originalEnumerator.Current;
     73        double estimated = estimatedEnumerator.Current;
    7474        normalizedMSECalculator.Add(original, estimated);
    7575      }
    7676
    7777      // always move forward both enumerators (do not use short-circuit evaluation!)
    78       while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    79         double estimated = secondEnumerator.Current;
    80         double original = firstEnumerator.Current;
     78      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
     79        double estimated = estimatedEnumerator.Current;
     80        double original = originalEnumerator.Current;
    8181        normalizedMSECalculator.Add(original, estimated);
    8282        if (normalizedMSECalculator.ErrorState != OnlineCalculatorError.None) break;
     
    8585      // check if both enumerators are at the end to make sure both enumerations have the same length
    8686      if (normalizedMSECalculator.ErrorState == OnlineCalculatorError.None &&
    87            (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
     87           (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())) {
    8888        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8989      } else {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs

    r5945 r6961  
    7474      // always move forward both enumerators (do not use short-circuit evaluation!)
    7575      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
     76        double original = firstEnumerator.Current;
    7677        double estimated = secondEnumerator.Current;
    77         double original = firstEnumerator.Current;
    7878        rSquaredCalculator.Add(original, estimated);
    7979        if (rSquaredCalculator.ErrorState != OnlineCalculatorError.None) break;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineTheilsUStatisticCalculator.cs

    r6807 r6961  
    8282    #endregion
    8383
    84     public static double Calculate(IEnumerable<double> estimatedValues, IEnumerable<double> originalValues, out OnlineCalculatorError errorState) {
     84    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
    8585      IEnumerator<double> originalValuesEnumerator = originalValues.GetEnumerator();
    8686      IEnumerator<double> estimatedValuesEnumerator = estimatedValues.GetEnumerator();
Note: See TracChangeset for help on using the changeset viewer.