Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/14/09 13:46:57 (15 years ago)
Author:
gkronber
Message:

Refactored GP evaluation to make it possible to use different evaluators to interpret function trees. #615 (Evaluation of HL3 function trees should be equivalent to evaluation in HL2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/ClassificationMeanSquaredErrorEvaluator.cs

    r1529 r1796  
    4343    }
    4444
    45     public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, double[] classes, double[] thresholds, int start, int end) {
     45    public override void Evaluate(IScope scope, ITreeEvaluator evaluator, IFunctionTree tree, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, double[] classes, double[] thresholds, int start, int end) {
    4646      double errorsSquaredSum = 0;
    4747      for (int sample = start; sample < end; sample++) {
    48         double estimated = evaluator.Evaluate(sample);
     48        double estimated = evaluator.Evaluate(tree, sample);
    4949        double original = dataset.GetValue(sample, targetVariable);
    5050        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
Note: See TracChangeset for help on using the changeset viewer.