Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/27/09 17:04:48 (15 years ago)
Author:
mkommend
Message:

corrected bug with total evaluated nodes; skipped samples were also counted (ticket #515)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/ConditionalSimpleEvaluator.cs

    r1915 r1916  
    5353      int minTimeOffset = GetVariableValue<IntData>("MinTimeOffset", scope, true).Data;
    5454      int conditionVariable = GetVariableValue<IntData>("ConditionVariable", scope, true).Data;
     55      int skippedSampels = 0;
    5556
    5657      for (int sample = start; sample < end; sample++) {
     
    5859        bool skip = false;
    5960        for (int checkIndex = sample + minTimeOffset; checkIndex <= sample + maxTimeOffset && !skip ; checkIndex++) {
    60           if (dataset.GetValue(checkIndex, conditionVariable) == 0)
     61          if (dataset.GetValue(checkIndex, conditionVariable) == 0) {
    6162            skip = true;
     63            skippedSampels++;
     64          }
    6265        }
    6366        if (!skip) {
     
    7376        }
    7477      }
     78      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data -= skippedSampels;
    7579    }
    7680  }
Note: See TracChangeset for help on using the changeset viewer.