Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/13/09 15:38:26 (16 years ago)
Author:
gkronber
Message:

fixed calculation of range of a variable (to ignore NaNs) and fixed calculation of maxPunishment in the BakedTreeEvaluator. #615 (Evaluation of HL3 function trees should be equivalent to evaluation in HL2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BakedTreeEvaluator.cs ΒΆ

    r1529 r1786  
    5656    public void ResetEvaluator(BakedFunctionTree functionTree, Dataset dataset, int targetVariable, int start, int end, double punishmentFactor) {
    5757      this.dataset = dataset;
    58       double maximumPunishment = punishmentFactor * dataset.GetRange(targetVariable);
     58      double maximumPunishment = punishmentFactor * dataset.GetRange(targetVariable, start, end);
    5959
    6060      // get the mean of the values of the target variable to determine the max and min bounds of the estimated value
    61       double targetMean = dataset.GetMean(targetVariable, start, end - 1);
     61      double targetMean = dataset.GetMean(targetVariable, start, end);
    6262      estimatedValueMin = targetMean - maximumPunishment;
    6363      estimatedValueMax = targetMean + maximumPunishment;
Note: See TracChangeset for help on using the changeset viewer.