Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5564


Ignore:
Timestamp:
02/28/11 09:40:16 (14 years ago)
Author:
gkronber
Message:

#1418 fixed bugs in online evaluators introduced with r5559

Location:
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineCovarianceEvaluator.cs

    r5559 r5564  
    7474      OnlineCovarianceEvaluator covarianceEvaluator = new OnlineCovarianceEvaluator();
    7575
    76       while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) {
     76      // always move forward both enumerators (do not use short-circuit evaluation!)
     77      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7778        double estimated = secondEnumerator.Current;
    7879        double original = firstEnumerator.Current;
     
    8081      }
    8182
     83      // check if both enumerators are at the end to make sure both enumerations have the same length
    8284      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    8385        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs

    r5559 r5564  
    7070      OnlineMeanAbsolutePercentageErrorEvaluator evaluator = new OnlineMeanAbsolutePercentageErrorEvaluator();
    7171
     72      // always move forward both enumerators (do not use short-circuit evaluation!)
    7273      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7374        double estimated = secondEnumerator.Current;
     
    7677      }
    7778
    78       if (secondEnumerator.MoveNext() && firstEnumerator.MoveNext()) {
     79      // check if both enumerators are at the end to make sure both enumerations have the same length
     80      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    7981        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8082      } else {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanSquaredErrorEvaluator.cs

    r5559 r5564  
    6767      OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();
    6868
    69       while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) {
     69      // always move forward both enumerators (do not use short-circuit evaluation!)
     70      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7071        double estimated = secondEnumerator.Current;
    7172        double original = firstEnumerator.Current;
     
    7374      }
    7475
     76      // check if both enumerators are at the end to make sure both enumerations have the same length
    7577      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    7678        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineNormalizedMeanSquaredErrorEvaluator.cs

    r5559 r5564  
    6767      OnlineNormalizedMeanSquaredErrorEvaluator normalizedMSEEvaluator = new OnlineNormalizedMeanSquaredErrorEvaluator();
    6868
    69       while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) {
     69      // always move forward both enumerators (do not use short-circuit evaluation!)
     70      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7071        double estimated = secondEnumerator.Current;
    7172        double original = firstEnumerator.Current;
     
    7374      }
    7475
     76      // check if both enumerators are at the end to make sure both enumerations have the same length
    7577      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    7678        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlinePearsonsRSquaredEvaluator.cs

    r5559 r5564  
    7575      OnlinePearsonsRSquaredEvaluator rSquaredEvaluator = new OnlinePearsonsRSquaredEvaluator();
    7676
    77       while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) {
     77      // always move forward both enumerators (do not use short-circuit evaluation!)
     78      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7879        double estimated = secondEnumerator.Current;
    7980        double original = firstEnumerator.Current;
     
    8182      }
    8283
     84      // check if both enumerators are at the end to make sure both enumerations have the same length
    8385      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    8486        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
Note: See TracChangeset for help on using the changeset viewer.