Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/08 18:05:14 (16 years ago)
Author:
gkronber
Message:

merged FunctionsAndStructIdRefactoring-branch (r142, r143, r144, r145, r146, r147, r148, r149, r152, r153) back into the trunk (ticket #112)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StructureIdentification/Evaluation/CoefficientOfDeterminationEvaluator.cs

    r128 r155  
    3434    public override string Description {
    3535      get {
    36         return @"Applies 'OperatorTree' to all samples of 'Dataset' and calculates
     36        return @"Evaluates 'FunctionTree' for all samples of 'Dataset' and calculates
    3737the 'coefficient of determination' of estimated values vs. real values of 'TargetVariable'.";
    3838      }
     
    4343    }
    4444
    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) {
    4646      double errorsSquaredSum = 0.0;
    4747      double originalDeviationTotalSumOfSquares = 0.0;
    4848      double targetMean = dataset.GetMean(targetVariable);
    4949      for(int sample = 0; sample < dataset.Rows; sample++) {
    50         double estimated = function.Evaluate(dataset, sample);
     50        double estimated = functionTree.Evaluate(dataset, sample);
    5151        double original = dataset.GetValue(sample, targetVariable);
    5252        if(!double.IsNaN(original) && !double.IsInfinity(original)) {
Note: See TracChangeset for help on using the changeset viewer.