Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/14/10 10:45:41 (14 years ago)
Author:
mkommend
Message:

implemented first version of partially evaluation of samples (ticket #1082)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs

    r3996 r4034  
    6666    }
    6767
    68     protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IntValue samplesStart, IntValue samplesEnd) {
    69       double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, samplesStart.Value, samplesEnd.Value);
     68    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
     69      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
    7070      return mse;
    7171    }
    7272
    73     public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, int start, int end) {
    74       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, Enumerable.Range(start, end - start));
    75       IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, start, end);
     73    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
     74      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
     75      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
    7676      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
    7777      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
Note: See TracChangeset for help on using the changeset viewer.