Changeset 5845
- Timestamp:
- 03/28/11 17:25:10 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineCovarianceEvaluator.cs
r5809 r5845 51 51 public void Add(double original, double estimated) { 52 52 if (double.IsNaN(estimated) || double.IsInfinity(estimated) || 53 double.IsNaN(original) || double.IsInfinity(original)) { 54 throw new ArgumentException("Covariance is not defined for series containing NaN or infinity elements"); 53 double.IsNaN(original) || double.IsInfinity(original) || 54 double.IsNaN(Cn)) { 55 Cn = double.NaN; 55 56 } else { 56 57 n++; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs
r5809 r5845 50 50 public void Add(double original, double estimated) { 51 51 if (double.IsNaN(estimated) || double.IsInfinity(estimated) || 52 double.IsNaN(original) || double.IsInfinity(original)) { 53 throw new ArgumentException("Relative error is not defined for variables with NaN or infinity values."); 52 double.IsNaN(original) || double.IsInfinity(original) || 53 double.IsNaN(sre)) { 54 sre = double.NaN; 54 55 } else { 55 56 if (!original.IsAlmost(0.0)) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanAndVarianceCalculator.cs
r5809 r5845 60 60 61 61 public void Add(double x) { 62 if (double.IsNaN(x) || double.IsInfinity(x)) { 63 throw new ArgumentException("Mean and variance are not defined for NaN or infinity elements"); 62 if (double.IsNaN(x) || double.IsInfinity(x) || double.IsNaN(m_newM)) { 63 m_newM = double.NaN; 64 m_newS = double.NaN; 64 65 } else { 65 66 n++; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanSquaredErrorEvaluator.cs
r5809 r5845 49 49 public void Add(double original, double estimated) { 50 50 if (double.IsNaN(estimated) || double.IsInfinity(estimated) || 51 double.IsNaN(original) || double.IsInfinity(original)) { 52 throw new ArgumentException("Mean squared error is not defined for NaN or infinity elements"); 51 double.IsNaN(original) || double.IsInfinity(original) || 52 double.IsNaN(sse)) { 53 sse = double.NaN; 53 54 } else { 54 55 double error = estimated - original;
Note: See TracChangeset
for help on using the changeset viewer.