Changeset 15973 for branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models
- Timestamp:
- 06/28/18 11:13:37 (7 years ago)
- Location:
- branches/2522_RefactorPluginInfrastructure
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2522_RefactorPluginInfrastructure
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/ConstantTimeSeriesPrognosisModel.cs
r13100 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 39 39 } 40 40 41 public ConstantTimeSeriesPrognosisModel(double constant ) : base(constant) { }41 public ConstantTimeSeriesPrognosisModel(double constant, string targetVariable) : base(constant, targetVariable) { } 42 42 43 43 public IEnumerable<IEnumerable<double>> GetPrognosedValues(IDataset dataset, IEnumerable<int> rows, IEnumerable<int> horizons) { -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/TimeSeriesPrognosisAutoRegressiveModel.cs
r12509 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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 { 32 public class TimeSeriesPrognosisAutoRegressiveModel : RegressionModel, ITimeSeriesPrognosisModel { 33 public override IEnumerable<string> VariablesUsedForPrediction { 34 get { return new[] { TargetVariable }; } 35 } 36 33 37 [Storable] 34 38 public double[] Phi { get; private set; } 35 39 [Storable] 36 40 public double Constant { get; private set; } 37 [Storable]38 public string TargetVariable { get; private set; }39 41 40 42 public int TimeOffset { get { return Phi.Length; } } … … 46 48 this.Phi = (double[])original.Phi.Clone(); 47 49 this.Constant = original.Constant; 48 this.TargetVariable = original.TargetVariable;49 50 } 50 51 public override IDeepCloneable Clone(Cloner cloner) { … … 52 53 } 53 54 public TimeSeriesPrognosisAutoRegressiveModel(string targetVariable, double[] phi, double constant) 54 : base( "AR(1) Model") {55 : base(targetVariable, "AR(1) Model") { 55 56 Phi = (double[])phi.Clone(); 56 57 Constant = constant; 57 TargetVariable = targetVariable;58 58 } 59 59 … … 91 91 } 92 92 93 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {93 public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 94 94 var targetVariables = dataset.GetReadOnlyDoubleValues(TargetVariable); 95 95 foreach (int row in rows) { … … 111 111 return new TimeSeriesPrognosisSolution(this, new TimeSeriesPrognosisProblemData(problemData)); 112 112 } 113 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {113 public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 114 114 throw new NotSupportedException(); 115 115 }
Note: See TracChangeset
for help on using the changeset viewer.