Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 10:43:58 (13 years ago)
Author:
gkronber
Message:

#1453: improved performance of online evaluators.

File:
1 edited

Legend:

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

    r5894 r5904  
    5454    public void Add(double original, double estimated) {
    5555      if (double.IsNaN(estimated) || double.IsInfinity(estimated) ||
    56           double.IsNaN(original) || double.IsInfinity(original)) {
     56          double.IsNaN(original) || double.IsInfinity(original) || (errorState & OnlineEvaluatorError.InvalidValueAdded) > 0) {
    5757        errorState = errorState | OnlineEvaluatorError.InvalidValueAdded;
    58       } else if (!errorState.HasFlag(OnlineEvaluatorError.InvalidValueAdded)) {
     58      } else {
    5959        double error = estimated - original;
    6060        sse += error * error;
    6161        n++;
    62         errorState = OnlineEvaluatorError.None; // n >= 1
     62        errorState = errorState & (~OnlineEvaluatorError.InsufficientElementsAdded);        // n >= 1
    6363      }
    6464    }
Note: See TracChangeset for help on using the changeset viewer.