- Timestamp:
- 07/09/10 17:01:36 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs
r3996 r4022 47 47 } 48 48 49 #region IPairedEnumerableEvaluator Members 49 #region IOnlineEvaluator Members 50 public double Value { 51 get { return MeanAbsolutePercentageError; } 52 } 50 53 public void Reset() { 51 54 n = 0; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanSquaredErrorEvaluator.cs
r3996 r4022 48 48 49 49 #region IOnlineEvaluator Members 50 public double Value { 51 get { return MeanSquaredError; } 52 } 50 53 public void Reset() { 51 54 n = 0; … … 56 59 if (double.IsNaN(estimated) || double.IsInfinity(estimated) || 57 60 double.IsNaN(original) || double.IsInfinity(original)) { 58 61 throw new ArgumentException("Mean squared error is not defined for NaN or infinity elements"); 59 62 } else { 60 63 double error = estimated - original; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlinePearsonsRSquaredEvaluator.cs
r3996 r4022 61 61 62 62 #region IOnlineEvaluator Members 63 public double Value { 64 get { return RSquared; } 65 } 63 66 public void Reset() { 64 67 sum_sq_x = 0.0; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs
r3462 r4022 50 50 51 51 public static double Calculate(IEnumerable<double> original, IEnumerable<double> estimated) { 52 double mse = SimpleMSEEvaluator.Calculate(original, estimated); 53 return mse / original.Variance(); 52 OnlineNormalizedMeanSquaredErrorEvaluator nmseEvaluator = new OnlineNormalizedMeanSquaredErrorEvaluator(); 53 var originalEnumerator = original.GetEnumerator(); 54 var estimatedEnumerator = estimated.GetEnumerator(); 55 while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) { 56 nmseEvaluator.Add(originalEnumerator.Current, estimatedEnumerator.Current); 57 } 58 if (originalEnumerator.MoveNext() || estimatedEnumerator.MoveNext()) { 59 throw new ArgumentException("Number of elements in original and estimated enumerations doesn't match."); 60 } 61 return nmseEvaluator.NormalizedMeanSquaredError; 54 62 } 55 63 }
Note: See TracChangeset
for help on using the changeset viewer.