Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/28/16 13:33:17 (9 years ago)
Author:
mkommend
Message:

#2604:

  • Base classes for data analysis, classification, and regression models
  • Added target variable to classification and regression models
  • Switched parameter order in data analysis solutions (model, problemdata)
File:
1 edited

Legend:

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

    r13921 r13941  
    3030  [StorableClass]
    3131  [Item("Autoregressive TimeSeries Model", "A linear autoregressive time series model used to predict future values.")]
    32   public class TimeSeriesPrognosisAutoRegressiveModel : NamedItem, ITimeSeriesPrognosisModel {
    33     public IEnumerable<string> VariablesUsedForPrediction {
     32  public class TimeSeriesPrognosisAutoRegressiveModel : RegressionModel, ITimeSeriesPrognosisModel {
     33    public override IEnumerable<string> VariablesUsedForPrediction {
    3434      get { return Enumerable.Empty<string>(); } // what to return here?
    3535    }
     
    3939    [Storable]
    4040    public double Constant { get; private set; }
    41     [Storable]
    42     public string TargetVariable { get; private set; }
    4341
    4442    public int TimeOffset { get { return Phi.Length; } }
     
    5048      this.Phi = (double[])original.Phi.Clone();
    5149      this.Constant = original.Constant;
    52       this.TargetVariable = original.TargetVariable;
    5350    }
    5451    public override IDeepCloneable Clone(Cloner cloner) {
     
    5653    }
    5754    public TimeSeriesPrognosisAutoRegressiveModel(string targetVariable, double[] phi, double constant)
    58       : base("AR(1) Model") {
     55      : base(targetVariable, "AR(1) Model") {
    5956      Phi = (double[])phi.Clone();
    6057      Constant = constant;
    61       TargetVariable = targetVariable;
    6258    }
    6359
     
    9591    }
    9692
    97     public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
     93    public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    9894      var targetVariables = dataset.GetReadOnlyDoubleValues(TargetVariable);
    9995      foreach (int row in rows) {
     
    115111      return new TimeSeriesPrognosisSolution(this, new TimeSeriesPrognosisProblemData(problemData));
    116112    }
    117     public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
     113    public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    118114      throw new NotSupportedException();
    119115    }
Note: See TracChangeset for help on using the changeset viewer.