Changeset 5945
- Timestamp:
- 04/04/11 18:09:49 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineAccuracyCalculator.cs
r5943 r5945 78 78 double original = firstEnumerator.Current; 79 79 accuracyCalculator.Add(original, estimated); 80 if (accuracyCalculator.ErrorState != OnlineCalculatorError.None) break; 80 81 } 81 82 82 83 // check if both enumerators are at the end to make sure both enumerations have the same length 83 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 84 if (accuracyCalculator.ErrorState == OnlineCalculatorError.None && 85 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 84 86 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 85 87 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalcualtor.cs
r5943 r5945 82 82 double original = firstEnumerator.Current; 83 83 covarianceCalculator.Add(original, estimated); 84 if (covarianceCalculator.ErrorState != OnlineCalculatorError.None) break; 84 85 } 85 86 86 87 // check if both enumerators are at the end to make sure both enumerations have the same length 87 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 88 if (covarianceCalculator.ErrorState == OnlineCalculatorError.None && 89 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 88 90 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 89 91 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineLinearScalingParameterCalculator.cs
r5943 r5945 107 107 double targetElement = targetEnumerator.Current; 108 108 calculator.Add(originalElement, targetElement); 109 if (calculator.ErrorState != OnlineCalculatorError.None) break; 109 110 } 110 111 111 112 // check if both enumerators are at the end to make sure both enumerations have the same length 112 if (originalEnumerator.MoveNext() || targetEnumerator.MoveNext()) { 113 if (calculator.ErrorState == OnlineCalculatorError.None && 114 (originalEnumerator.MoveNext() || targetEnumerator.MoveNext())) { 113 115 throw new ArgumentException("Number of elements in original and target enumeration do not match."); 114 116 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsolutePercentageErrorCalculator.cs
r5943 r5945 77 77 double original = firstEnumerator.Current; 78 78 calculator.Add(original, estimated); 79 if (calculator.ErrorState != OnlineCalculatorError.None) break; 79 80 } 80 81 81 82 // check if both enumerators are at the end to make sure both enumerations have the same length 82 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 83 if (calculator.ErrorState == OnlineCalculatorError.None && 84 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 83 85 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 84 86 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAndVarianceCalculator.cs
r5943 r5945 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanSquaredErrorCalculator.cs
r5943 r5945 75 75 double original = firstEnumerator.Current; 76 76 mseCalculator.Add(original, estimated); 77 if (mseCalculator.ErrorState != OnlineCalculatorError.None) break; 77 78 } 78 79 79 80 // check if both enumerators are at the end to make sure both enumerations have the same length 80 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 81 if (mseCalculator.ErrorState == OnlineCalculatorError.None && 82 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 81 83 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 82 84 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.cs
r5943 r5945 73 73 double original = firstEnumerator.Current; 74 74 normalizedMSECalculator.Add(original, estimated); 75 if (normalizedMSECalculator.ErrorState != OnlineCalculatorError.None) break; 75 76 } 76 77 77 78 // check if both enumerators are at the end to make sure both enumerations have the same length 78 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 79 if (normalizedMSECalculator.ErrorState == OnlineCalculatorError.None && 80 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 79 81 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 80 82 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs
r5943 r5945 77 77 double original = firstEnumerator.Current; 78 78 rSquaredCalculator.Add(original, estimated); 79 if (rSquaredCalculator.ErrorState != OnlineCalculatorError.None) break; 79 80 } 80 81 81 82 // check if both enumerators are at the end to make sure both enumerations have the same length 82 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 83 if (rSquaredCalculator.ErrorState == OnlineCalculatorError.None && 84 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 83 85 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 84 86 } else {
Note: See TracChangeset
for help on using the changeset viewer.