Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/08 17:30:24 (16 years ago)
Author:
gkronber
Message:
  • implemented operator to store the best of run solution, in regard of a specific fitness variable).
  • adapted struct-id infrastructure to allow evaluation of models on validation data.

ticket #194

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StructureIdentification/Evaluation/GPEvaluatorBase.cs

    r334 r363  
    5757      this.totalEvaluatedNodes = scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data;
    5858      double result = Evaluate(scope, functionTree, targetVariable, dataset);
    59       scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("Quality"), new DoubleData(result)));
     59
     60      DoubleData quality = GetVariableValue<DoubleData>("Quality", scope, false, false);
     61      if(quality == null) {
     62        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("Quality"), new DoubleData(result)));
     63      } else {
     64        quality.Data = result;
     65      }
     66
    6067      return null;
    6168    }
Note: See TracChangeset for help on using the changeset viewer.