Changeset 155 for trunk/sources/HeuristicLab.StructureIdentification/Evaluation/CoefficientOfDeterminationEvaluator.cs
- Timestamp:
- 04/22/08 18:05:14 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/Evaluation/CoefficientOfDeterminationEvaluator.cs
r128 r155 34 34 public override string Description { 35 35 get { 36 return @" Applies 'OperatorTree' toall samples of 'Dataset' and calculates36 return @"Evaluates 'FunctionTree' for all samples of 'Dataset' and calculates 37 37 the 'coefficient of determination' of estimated values vs. real values of 'TargetVariable'."; 38 38 } … … 43 43 } 44 44 45 public override double Evaluate(IScope scope, IFunction function, int targetVariable, Dataset dataset) {45 public override double Evaluate(IScope scope, IFunctionTree functionTree, int targetVariable, Dataset dataset) { 46 46 double errorsSquaredSum = 0.0; 47 47 double originalDeviationTotalSumOfSquares = 0.0; 48 48 double targetMean = dataset.GetMean(targetVariable); 49 49 for(int sample = 0; sample < dataset.Rows; sample++) { 50 double estimated = function .Evaluate(dataset, sample);50 double estimated = functionTree.Evaluate(dataset, sample); 51 51 double original = dataset.GetValue(sample, targetVariable); 52 52 if(!double.IsNaN(original) && !double.IsInfinity(original)) {
Note: See TracChangeset
for help on using the changeset viewer.