Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/25/08 14:46:03 (17 years ago)
Author:
gkronber
Message:

minor speed tuning

File:
1 edited

Legend:

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

    r170 r191  
    4343    }
    4444
     45    private double[] original = new double[1];
     46    private double[] estimated = new double[1];
    4547    public override double Evaluate(IScope scope, IFunctionTree functionTree, int targetVariable, Dataset dataset) {
    4648      double limit = GetVariableValue<DoubleData>("ClassSeparation", scope, false).Data;
    47       double[] estimated = new double[dataset.Rows];
    48       double[] original = new double[dataset.Rows];
     49      if(estimated.Length != dataset.Rows) {
     50        estimated = new double[dataset.Rows];
     51        original = new double[dataset.Rows];
     52      }
    4953      double positive = 0;
    5054      double negative = 0;
Note: See TracChangeset for help on using the changeset viewer.