Changeset 712 for trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/SimpleEvaluator.cs
- Timestamp:
- 11/05/08 21:34:12 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/SimpleEvaluator.cs
r702 r712 38 38 public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) { 39 39 ItemList values = GetVariableValue<ItemList>("Values", scope, false, false); 40 if (values == null) {40 if (values == null) { 41 41 values = new ItemList(); 42 42 IVariableInfo info = GetVariableInfo("Values"); 43 if (info.Local)43 if (info.Local) 44 44 AddVariable(new HeuristicLab.Core.Variable(info.ActualName, values)); 45 45 else … … 48 48 values.Clear(); 49 49 50 for (int sample = start; sample < end; sample++) {50 for (int sample = start; sample < end; sample++) { 51 51 ItemList row = new ItemList(); 52 52 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); 56 56 } 57 57 row.Add(new DoubleData(estimated));
Note: See TracChangeset
for help on using the changeset viewer.