Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/05/08 21:34:12 (16 years ago)
Author:
gkronber
Message:

fixed a stupid mistake introduced with r702 #328 (GP evaluation doesn't work in a thread parallel engine).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/SimpleEvaluator.cs

    r702 r712  
    3838    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
    3939      ItemList values = GetVariableValue<ItemList>("Values", scope, false, false);
    40       if(values == null) {
     40      if (values == null) {
    4141        values = new ItemList();
    4242        IVariableInfo info = GetVariableInfo("Values");
    43         if(info.Local)
     43        if (info.Local)
    4444          AddVariable(new HeuristicLab.Core.Variable(info.ActualName, values));
    4545        else
     
    4848      values.Clear();
    4949
    50       for(int sample = start; sample < end; sample++) {
     50      for (int sample = start; sample < end; sample++) {
    5151        ItemList row = new ItemList();
    5252        double estimated = evaluator.Evaluate(sample);
    53         double original = dataset.GetValue(targetVariable, sample);
    54         if(updateTargetValues) {
    55           dataset.SetValue(targetVariable, sample, estimated);
     53        double original = dataset.GetValue(sample, targetVariable);
     54        if (updateTargetValues) {
     55          dataset.SetValue(sample, targetVariable, estimated);
    5656        }
    5757        row.Add(new DoubleData(estimated));
Note: See TracChangeset for help on using the changeset viewer.