Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/26/10 12:48:22 (14 years ago)
Author:
gkronber
Message:

Extended covariant parsimony pressure operator to make it possible to apply pressure over the whole run, increasing the avg. tree size gradually and decreasing it when overfitting. #1142

File:
1 edited

Legend:

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

    r4309 r4329  
    7373    public IValueLookupParameter<PercentValue> ComplexityAdaptionParameter {
    7474      get { return (IValueLookupParameter<PercentValue>)Parameters["ComplexityAdaption"]; }
     75    }
     76    public IValueLookupParameter<BoolValue> InvertComplexityAdaptionParameter {
     77      get { return (IValueLookupParameter<BoolValue>)Parameters["InvertComplexityAdaption"]; }
    7578    }
    7679    public IValueLookupParameter<DoubleValue> MinAverageSizeParameter {
     
    9497      Parameters.Add(new ValueLookupParameter<DoubleValue>("MinAverageSize", new DoubleValue(15)));
    9598      Parameters.Add(new LookupParameter<DoubleValue>("C"));
     99      Parameters.Add(new ValueLookupParameter<BoolValue>("InvertComplexityAdaption"));
    96100    }
    97101
     
    122126      if (!Parameters.ContainsKey("C")) {
    123127        Parameters.Add(new LookupParameter<DoubleValue>("C"));
     128      }
     129      if (!Parameters.ContainsKey("InvertComplexityAdaption")) {
     130        Parameters.Add(new ValueLookupParameter<BoolValue>("InvertComplexityAdaption"));
    124131      }
    125132    }
     
    157164        }
    158165
    159         double sizeAdaption = lengthMeanCalculator.Mean * ComplexityAdaptionParameter.ActualValue.Value;
     166        //double sizeAdaption = lengthMeanCalculator.Mean * ComplexityAdaptionParameter.ActualValue.Value;
     167        double sizeAdaption = 100.0 * ComplexityAdaptionParameter.ActualValue.Value;
     168        if (InvertComplexityAdaptionParameter.ActualValue != null && InvertComplexityAdaptionParameter.ActualValue.Value) {
     169          sizeAdaption = -sizeAdaption;
     170        }
    160171        if (lengthMeanCalculator.Mean + sizeAdaption < MinAverageSizeParameter.ActualValue.Value)
    161172          sizeAdaption = 0.0;
Note: See TracChangeset for help on using the changeset viewer.