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/OnlinePearsonsRSquaredEvaluator.cs

    r5809 r5894  
    4646
    4747    #region IOnlineEvaluator Members
     48    public OnlineEvaluatorError ErrorState {
     49      get { return covEvaluator.ErrorState | sxEvaluator.PopulationVarianceErrorState | syEvaluator.PopulationVarianceErrorState; }
     50    }
    4851    public double Value {
    4952      get { return RSquared; }
     
    6467    #endregion
    6568
    66     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second) {
     69    public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineEvaluatorError errorState) {
    6770      IEnumerator<double> firstEnumerator = first.GetEnumerator();
    6871      IEnumerator<double> secondEnumerator = second.GetEnumerator();
     
    8083        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
    8184      } else {
     85        errorState = rSquaredEvaluator.ErrorState;
    8286        return rSquaredEvaluator.RSquared;
    8387      }
Note: See TracChangeset for help on using the changeset viewer.