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.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs

    r5809 r5894  
    8484      var classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter);
    8585      classifier.SetThresholdsAndClassValues(thresholds, classValues);
    86       double originalAccuracy = OnlineAccuracyEvaluator.Calculate(targetClassValues, classifier.GetEstimatedClassValues(dataset, rows));
     86      OnlineEvaluatorError errorState;
     87      double originalAccuracy = OnlineAccuracyEvaluator.Calculate(targetClassValues, classifier.GetEstimatedClassValues(dataset, rows), out errorState);
     88      if (errorState != OnlineEvaluatorError.None) originalAccuracy = 0.0;
    8789
    8890      foreach (ISymbolicExpressionTreeNode node in nodes) {
     
    9799        classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter);
    98100        classifier.SetThresholdsAndClassValues(thresholds, classValues);
    99         double newAccuracy = OnlineAccuracyEvaluator.Calculate(targetClassValues, classifier.GetEstimatedClassValues(dataset, rows));
     101        double newAccuracy = OnlineAccuracyEvaluator.Calculate(targetClassValues, classifier.GetEstimatedClassValues(dataset, rows), out errorState);
     102        if (errorState != OnlineEvaluatorError.None) newAccuracy = 0.0;
    100103
    101104        // impact = 0 if no change
Note: See TracChangeset for help on using the changeset viewer.