Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/26/16 23:21:50 (7 years ago)
Author:
gkronber
Message:

#2529: added a way to calculate prognosed values for the whole test partition and added a specific implementation of the line chart for time series models

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolution.cs

    r14185 r14422  
    2121
    2222using System.Collections.Generic;
     23using System.Linq;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4344      return Model.GetPrognosedValues(ProblemData.Dataset, rows, horizons);
    4445    }
     46
     47    public override IEnumerable<double> PrognosedTestValues {
     48      get {
     49        return Model.GetPrognosedValues(ProblemData.Dataset, ProblemData.TestIndices.Take(1),
     50          new int[] { ProblemData.TestIndices.Count() }).First();
     51      }
     52    }
    4553  }
    4654}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs

    r14185 r14422  
    6464    }
    6565
     66    public abstract IEnumerable<double> PrognosedTestValues { get; }
    6667    public abstract IEnumerable<IEnumerable<double>> GetPrognosedValues(IEnumerable<int> rows, IEnumerable<int> horizon);
    6768
     
    150151      OnlineCalculatorError errorState;
    151152      double trainingMean = ProblemData.TrainingIndices.Any() ? ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average() : double.NaN;
    152       var meanModel = new ConstantModel(trainingMean,ProblemData.TargetVariable);
     153      var meanModel = new ConstantModel(trainingMean, ProblemData.TargetVariable);
    153154
    154155      double alpha, beta;
Note: See TracChangeset for help on using the changeset viewer.