Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5436


Ignore:
Timestamp:
02/04/11 21:44:24 (14 years ago)
Author:
gkronber
Message:

#1356 clarified code in overfitting analyzer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionOverfittingAnalyzer.cs

    r5197 r5436  
    119119      TrainingValidationQualityCorrelationTableParameter.ActualValue.Rows["Training and validation fitness correlation"].Values.Add(r);
    120120
    121       double correlationThreshold;
    122121      if (OverfittingParameter.ActualValue != null && OverfittingParameter.ActualValue.Value) {
    123         // if is already overfitting => have to reach the upper threshold to switch back to non-overfitting state
    124         correlationThreshold = UpperCorrelationThresholdParameter.ActualValue.Value;
     122        // overfitting == true
     123        // => r must reach the upper threshold to switch back to non-overfitting state
     124        OverfittingParameter.ActualValue = new BoolValue(r < UpperCorrelationThresholdParameter.ActualValue.Value);
    125125      } else {
    126         // if currently in non-overfitting state => have to reach to lower threshold to switch to overfitting state
    127         correlationThreshold = LowerCorrelationThresholdParameter.ActualValue.Value;
     126        // overfitting == false
     127        // => r must drop below lower threshold to switch to overfitting state
     128        OverfittingParameter.ActualValue = new BoolValue(r < LowerCorrelationThresholdParameter.ActualValue.Value);
    128129      }
    129       bool overfitting = r < correlationThreshold;
    130 
    131       OverfittingParameter.ActualValue = new BoolValue(overfitting);
    132130    }
    133131  }
Note: See TracChangeset for help on using the changeset viewer.