Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/11 17:25:10 (13 years ago)
Author:
gkronber
Message:

#1453: changed OnlineEvaluators so that they do not throw an ArgumentException on receiving infinity of NaN values but instead return double.NaN as result.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanSquaredErrorEvaluator.cs

    r5809 r5845  
    4949    public void Add(double original, double estimated) {
    5050      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;
    5354      } else {
    5455        double error = estimated - original;
Note: See TracChangeset for help on using the changeset viewer.