- Timestamp:
- 07/06/09 17:12:37 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling/3.2/SimpleMSEEvaluator.cs
r1888 r2136 16 16 } 17 17 public override double Evaluate(double[,] values) { 18 return Calculate(values); 18 try { 19 return Calculate(values); 20 } 21 catch (ArgumentException) { 22 return double.PositiveInfinity; 23 } 19 24 } 20 25 … … 32 37 } 33 38 } 34 35 double mse = sse / cnt; 36 return mse; 39 if (cnt > 0) { 40 double mse = sse / cnt; 41 return mse; 42 } else { 43 throw new ArgumentException("Mean squared errors is not defined for input vectors of NaN or Inf"); 44 } 37 45 } 38 46 }
Note: See TracChangeset
for help on using the changeset viewer.