- Timestamp:
- 07/25/08 14:07:35 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.StructureIdentification/Evaluation
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/Evaluation/TheilInequalityCoefficientEvaluator.cs
r369 r395 41 41 public TheilInequalityCoefficientEvaluator() 42 42 : base() { 43 AddVariableInfo(new VariableInfo("Differential", "Wether to calculate the coefficient for the predicted change vs. original change or for the absolute prediction vs. original value", typeof(BoolData), VariableKind.In)); 43 44 } 44 45 … … 46 47 int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data; 47 48 int trainingEnd = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data; 49 bool difference = GetVariableValue<BoolData>("Differential", scope, true).Data; 48 50 double errorsSquaredSum = 0.0; 49 51 double estimatedSquaredSum = 0.0; … … 51 53 functionTree.PrepareEvaluation(dataset); 52 54 for(int sample = trainingStart; sample < trainingEnd; sample++) { 53 double prevValue = dataset.GetValue(sample - 1, targetVariable); 55 double prevValue = 0.0; 56 if(difference) prevValue = dataset.GetValue(sample - 1, targetVariable); 54 57 double estimatedChange = functionTree.Evaluate(sample) - prevValue; 55 58 double originalChange = dataset.GetValue(sample, targetVariable) - prevValue;
Note: See TracChangeset
for help on using the changeset viewer.