Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1484


Ignore:
Timestamp:
04/02/09 14:11:33 (16 years ago)
Author:
gkronber
Message:

Fixed programming error. #564 (Sliding window approach for data-based modeling)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP/TrainingWindowSlider.cs

    r1482 r1484  
    5151      int trainingSamplesStart = GetVariableValue<IntData>(TRAINING_SAMPLES_START, scope, true).Data;
    5252      int trainingSamplesEnd = GetVariableValue<IntData>(TRAINING_SAMPLES_END, scope, true).Data;
    53       int trainingWindowStart = GetVariableValue<IntData>(TRAINING_WINDOW_START, scope, true).Data;
    54       int trainingWindowEnd = GetVariableValue<IntData>(TRAINING_WINDOW_END, scope, true).Data;
     53      IntData trainingWindowStart = GetVariableValue<IntData>(TRAINING_WINDOW_START, scope, true);
     54      IntData trainingWindowEnd = GetVariableValue<IntData>(TRAINING_WINDOW_END, scope, true);
    5555      int stepSize = GetVariableValue<IntData>(STEP_SIZE, scope, true).Data;
    5656
    57       if (trainingWindowEnd + stepSize <= trainingSamplesEnd) {
    58         trainingWindowStart = trainingWindowStart + stepSize;
    59         trainingWindowEnd = trainingWindowEnd + stepSize;
     57      if (trainingWindowEnd.Data + stepSize <= trainingSamplesEnd) {
     58        trainingWindowStart.Data = trainingWindowStart.Data + stepSize;
     59        trainingWindowEnd.Data = trainingWindowEnd.Data + stepSize;
    6060      }
    6161
Note: See TracChangeset for help on using the changeset viewer.