Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/12 09:15:55 (12 years ago)
Author:
mkommend
Message:

#1081: Corrected scaling behavior of symbolic time series models.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs

    r8010 r8114  
    9898    }
    9999
    100     public static void Scale(SymbolicTimeSeriesPrognosisModel model, ITimeSeriesPrognosisProblemData problemData) {
     100    public static void Scale(SymbolicTimeSeriesPrognosisModel model, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows) {
    101101      var dataset = problemData.Dataset;
    102102      var targetVariable = problemData.TargetVariable;
    103       var rows = problemData.TrainingIndizes;
    104       var estimatedValuesEnumerator = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
    105       var targetValuesEnumerator = problemData.Dataset.GetDoubleValues(targetVariable, rows);
     103      var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
     104      var boundedEstimatedValues = estimatedValues.LimitToRange(model.lowerEstimationLimit, model.upperEstimationLimit);
     105      var targetValues = problemData.Dataset.GetDoubleValues(targetVariable, rows);
    106106
    107107      double alpha, beta;
    108108      OnlineCalculatorError error;
    109       OnlineLinearScalingParameterCalculator.Calculate(estimatedValuesEnumerator, targetValuesEnumerator, out alpha, out beta, out error);
     109      OnlineLinearScalingParameterCalculator.Calculate(boundedEstimatedValues, targetValues, out alpha, out beta, out error);
    110110      if (error != OnlineCalculatorError.None) return;
    111111
Note: See TracChangeset for help on using the changeset viewer.