Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/30/11 18:04:03 (13 years ago)
Author:
gkronber
Message:

#1453: Added an ErrorState property to online evaluators to indicate if the result value is valid or if there has been an error in the calculation. Adapted all classes that use one of the online evaluators to check this property.

File:
1 edited

Legend:

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

    r5809 r5894  
    4343
    4444    #region IOnlineEvaluator Members
     45    public OnlineEvaluatorError ErrorState {
     46      get { return meanSquaredErrorCalculator.MeanErrorState | originalVarianceCalculator.VarianceErrorState; }
     47    }
    4548    public double Value {
    4649      get { return NormalizedMeanSquaredError; }
     
    6063    #endregion
    6164
    62     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second) {
     65    public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineEvaluatorError errorState) {
    6366      IEnumerator<double> firstEnumerator = first.GetEnumerator();
    6467      IEnumerator<double> secondEnumerator = second.GetEnumerator();
     
    7679        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    7780      } else {
     81        errorState = normalizedMSEEvaluator.ErrorState;
    7882        return normalizedMSEEvaluator.NormalizedMeanSquaredError;
    7983      }
Note: See TracChangeset for help on using the changeset viewer.