Changeset 367 for trunk/sources/HeuristicLab.StructureIdentification/Evaluation/CoefficientOfDeterminationEvaluator.cs
- Timestamp:
- 07/07/08 16:59:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/Evaluation/CoefficientOfDeterminationEvaluator.cs
r363 r367 44 44 45 45 public override double Evaluate(IScope scope, IFunctionTree functionTree, int targetVariable, Dataset dataset) { 46 int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data; 47 int trainingEnd = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data; 46 48 double errorsSquaredSum = 0.0; 47 49 double originalDeviationTotalSumOfSquares = 0.0; 48 double targetMean = dataset.GetMean(targetVariable );50 double targetMean = dataset.GetMean(targetVariable, trainingStart, trainingEnd); 49 51 functionTree.PrepareEvaluation(dataset); 50 for(int sample = 0; sample < dataset.Rows; sample++) {52 for(int sample = trainingStart; sample < trainingEnd; sample++) { 51 53 double estimated = functionTree.Evaluate(sample); 52 54 double original = dataset.GetValue(sample, targetVariable);
Note: See TracChangeset
for help on using the changeset viewer.