Changeset 13941 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis
- Timestamp:
- 06/28/16 13:33:17 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/TimeSeriesPrognosisAutoRegressiveModel.cs
r13921 r13941 30 30 [StorableClass] 31 31 [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 { 34 34 get { return Enumerable.Empty<string>(); } // what to return here? 35 35 } … … 39 39 [Storable] 40 40 public double Constant { get; private set; } 41 [Storable]42 public string TargetVariable { get; private set; }43 41 44 42 public int TimeOffset { get { return Phi.Length; } } … … 50 48 this.Phi = (double[])original.Phi.Clone(); 51 49 this.Constant = original.Constant; 52 this.TargetVariable = original.TargetVariable;53 50 } 54 51 public override IDeepCloneable Clone(Cloner cloner) { … … 56 53 } 57 54 public TimeSeriesPrognosisAutoRegressiveModel(string targetVariable, double[] phi, double constant) 58 : base( "AR(1) Model") {55 : base(targetVariable, "AR(1) Model") { 59 56 Phi = (double[])phi.Clone(); 60 57 Constant = constant; 61 TargetVariable = targetVariable;62 58 } 63 59 … … 95 91 } 96 92 97 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {93 public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 98 94 var targetVariables = dataset.GetReadOnlyDoubleValues(TargetVariable); 99 95 foreach (int row in rows) { … … 115 111 return new TimeSeriesPrognosisSolution(this, new TimeSeriesPrognosisProblemData(problemData)); 116 112 } 117 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {113 public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 118 114 throw new NotSupportedException(); 119 115 }
Note: See TracChangeset
for help on using the changeset viewer.