Changeset 1916
- Timestamp:
- 05/27/09 17:04:48 (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
r1915 r1916 45 45 int conditionVariable = GetVariableValue<IntData>("ConditionVariable", scope, true).Data; 46 46 47 int skippedSampels = 0; 47 48 // store original and estimated values in a double array 48 49 double[,] values = new double[end - start, 2]; … … 51 52 bool skip = false; 52 53 for (int checkIndex = sample + minTimeOffset; checkIndex <= sample + maxTimeOffset && !skip ; checkIndex++) { 53 if (dataset.GetValue(checkIndex, conditionVariable) == 0) 54 if (dataset.GetValue(checkIndex, conditionVariable) == 0) { 54 55 skip = true; 56 skippedSampels++; 57 } 55 58 } 56 59 if (!skip) { … … 65 68 } 66 69 70 67 71 // calculate quality value 68 72 double quality = Evaluate(values); … … 74 78 } 75 79 qualityData.Data = quality; 80 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data -= skippedSampels; 76 81 } 77 82 -
trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/ConditionalSimpleEvaluator.cs
r1915 r1916 53 53 int minTimeOffset = GetVariableValue<IntData>("MinTimeOffset", scope, true).Data; 54 54 int conditionVariable = GetVariableValue<IntData>("ConditionVariable", scope, true).Data; 55 int skippedSampels = 0; 55 56 56 57 for (int sample = start; sample < end; sample++) { … … 58 59 bool skip = false; 59 60 for (int checkIndex = sample + minTimeOffset; checkIndex <= sample + maxTimeOffset && !skip ; checkIndex++) { 60 if (dataset.GetValue(checkIndex, conditionVariable) == 0) 61 if (dataset.GetValue(checkIndex, conditionVariable) == 0) { 61 62 skip = true; 63 skippedSampels++; 64 } 62 65 } 63 66 if (!skip) { … … 73 76 } 74 77 } 78 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data -= skippedSampels; 75 79 } 76 80 }
Note: See TracChangeset
for help on using the changeset viewer.