- Timestamp:
- 01/01/10 19:06:18 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/ConditionalEvaluatorBase.cs
r1926 r2577 40 40 } 41 41 42 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end , bool updateTargetValues) {42 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end) { 43 43 int maxTimeOffset = GetVariableValue<IntData>("MaxTimeOffset", scope, true).Data; 44 44 int minTimeOffset = GetVariableValue<IntData>("MinTimeOffset", scope, true).Data; … … 60 60 double original = dataset.GetValue(sample, targetVariable); 61 61 double estimated = evaluator.Evaluate(sample); 62 if (updateTargetValues) { 63 dataset.SetValue(sample, targetVariable, estimated); 64 } 62 65 63 values[sample - start - skippedSampels, 0] = estimated; 66 64 values[sample - start - skippedSampels, 1] = original; 67 65 } 68 66 } 69 //needed because otherwise the array is too large d dimension and therefore the sample count is falseduring calculation67 //needed because otherwise the array is too large and therefore the sample count is incorrect during calculation 70 68 ResizeArray(ref values, 2, end - start - skippedSampels); 71 69 -
trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/ConditionalSimpleEvaluator.cs
r1916 r2577 38 38 } 39 39 40 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end , bool updateTargetValues) {40 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end) { 41 41 ItemList values = GetVariableValue<ItemList>("Values", scope, false, false); 42 42 if (values == null) { … … 68 68 double estimated = evaluator.Evaluate(sample); 69 69 double original = dataset.GetValue(sample, targetVariable); 70 if (updateTargetValues) { 71 dataset.SetValue(sample, targetVariable, estimated); 72 } 70 73 71 row.Add(new DoubleData(estimated)); 74 72 row.Add(new DoubleData(original));
Note: See TracChangeset
for help on using the changeset viewer.