Changeset 4228


Ignore:
Timestamp:
08/16/10 11:25:07 (12 years ago)
Author:
gkronber
Message:

Fixed calculation of relative quality for maximization problems in DDL. #1142

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/DynamicDepthLimitComparator.cs

    r4223 r4228  
    9191        double cLower = CLowerParameter.Value.Value;
    9292        double bestQuality = BestQualityParameter.ActualValue.Value;
    93         double relativeQuality = maximization ? (leftQuality - bestQuality) / leftQuality : (bestQuality - leftQuality) / leftQuality;
     93        double relativeQuality = maximization ? leftQuality / bestQuality - 1 : bestQuality / leftQuality - 1;
    9494        if (tree.Height <= ddl) {
    9595          // height is smaller than ddl => check improvement and reduce ddl
Note: See TracChangeset for help on using the changeset viewer.