Changeset 4457
- Timestamp:
- 09/21/10 10:16:49 (14 years ago)
- Location:
- branches/DataAnalysis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/ResultsView.cs
r4401 r4457 145 145 146 146 for (int row = start; row < end; row++) { 147 // prepare evaluators for each target variable for a new prediction window 148 foreach (var entry in evaluators) { 149 double referenceOriginalValue = Content.ProblemData.Dataset[entry.Key, row - 1]; 150 foreach (IOnlineTimeSeriesPrognosisEvaluator evaluator in entry.Value.OfType<IOnlineTimeSeriesPrognosisEvaluator>()) { 151 evaluator.StartNewPredictionWindow(referenceOriginalValue); 147 if (string.IsNullOrEmpty(Content.ConditionalEvaluationVariable) || Content.ProblemData.Dataset[Content.ConditionalEvaluationVariable, row] != 0) { 148 // prepare evaluators for each target variable for a new prediction window 149 foreach (var entry in evaluators) { 150 double referenceOriginalValue = Content.ProblemData.Dataset[entry.Key, row - 1]; 151 foreach (IOnlineTimeSeriesPrognosisEvaluator evaluator in entry.Value.OfType<IOnlineTimeSeriesPrognosisEvaluator>()) { 152 evaluator.StartNewPredictionWindow(referenceOriginalValue); 153 } 152 154 } 153 } 154 List<string> targetVariables = Content.ProblemData.TargetVariables.CheckedItems.Select(x => x.Value.Value).ToList(); 155 List<string> targetVariables = Content.ProblemData.TargetVariables.CheckedItems.Select(x => x.Value.Value).ToList(); 155 156 156 int timestep = 0; 157 foreach (double[] x in Content.GetPrognosis(row)) { 158 int targetIndex = 0; 159 foreach (var targetVariable in targetVariables) { 160 double originalValue = Content.ProblemData.Dataset[targetVariable, row + timestep]; 161 double estimatedValue = x[targetIndex]; 162 if (IsValidValue(originalValue) && IsValidValue(estimatedValue)) { 163 foreach (IOnlineEvaluator evaluator in evaluators[targetVariable]) { 164 evaluator.Add(originalValue, estimatedValue); 157 int timestep = 0; 158 foreach (double[] x in Content.GetPrognosis(row)) { 159 int targetIndex = 0; 160 foreach (var targetVariable in targetVariables) { 161 double originalValue = Content.ProblemData.Dataset[targetVariable, row + timestep]; 162 double estimatedValue = x[targetIndex]; 163 if (IsValidValue(originalValue) && IsValidValue(estimatedValue)) { 164 foreach (IOnlineEvaluator evaluator in evaluators[targetVariable]) { 165 evaluator.Add(originalValue, estimatedValue); 166 } 165 167 } 168 targetIndex++; 166 169 } 167 t argetIndex++;170 timestep++; 168 171 } 169 timestep++;170 172 } 171 173 } -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicTimeSeriesPrognosisSolutionAnalyzer.cs
r4401 r4457 295 295 model.Description = "Best solution on validation partition found over the whole run."; 296 296 297 var solution = new SymbolicTimeSeriesPrognosisSolution(ProblemData, model, PredictionHorizon.Value );297 var solution = new SymbolicTimeSeriesPrognosisSolution(ProblemData, model, PredictionHorizon.Value, conditionalVariableName); 298 298 solution.Name = BestSolutionParameterName; 299 299 solution.Description = "Best solution on validation partition found over the whole run."; -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/SymbolicTimeSeriesPrognosisSolution.cs
r4401 r4457 35 35 [StorableClass] 36 36 [Item("SymbolicTimeSeriesPrognosisSolution", "Represents a solution for time series prognosis.")] 37 public class SymbolicTimeSeriesPrognosisSolution : NamedItem, IMultiVariateDataAnalysisSolution {37 public class SymbolicTimeSeriesPrognosisSolution : NamedItem, IMultiVariateDataAnalysisSolution, IStorableContent { 38 38 [Storable] 39 39 private MultiVariateDataAnalysisProblemData problemData; … … 42 42 [Storable] 43 43 private int horizon; 44 [Storable] 45 private string conditionalEvaluationVariable; 46 47 public string FileName { get; set; } 44 48 45 49 [StorableConstructor] … … 50 54 } 51 55 52 public SymbolicTimeSeriesPrognosisSolution(MultiVariateDataAnalysisProblemData problemData, SymbolicTimeSeriesPrognosisModel model, int horizon )56 public SymbolicTimeSeriesPrognosisSolution(MultiVariateDataAnalysisProblemData problemData, SymbolicTimeSeriesPrognosisModel model, int horizon, string conditionalEvaluationVariable) 53 57 : this() { 54 58 this.problemData = problemData; 55 59 this.model = model; 56 60 this.horizon = horizon; 61 this.conditionalEvaluationVariable = conditionalEvaluationVariable; 57 62 } 58 63 … … 82 87 model = value; 83 88 RaiseModelChanged(); 89 } 90 } 91 } 92 93 public string ConditionalEvaluationVariable { 94 get { return conditionalEvaluationVariable; } 95 set { 96 if (conditionalEvaluationVariable != value) { 97 conditionalEvaluationVariable = value; 98 RaiseEstimatedValuesChanged(); 84 99 } 85 100 } … … 182 197 clone.model = (SymbolicTimeSeriesPrognosisModel)cloner.Clone(model); 183 198 clone.horizon = horizon; 199 clone.conditionalEvaluationVariable = conditionalEvaluationVariable; 184 200 return clone; 185 201 } -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs
r4112 r4457 33 33 [Creatable("Problems")] 34 34 [StorableClass] 35 public class MultiVariateDataAnalysisProblem : ParameterizedNamedItem, IMultiVariateDataAnalysisProblem {35 public class MultiVariateDataAnalysisProblem : ParameterizedNamedItem, IMultiVariateDataAnalysisProblem, IStorableContent { 36 36 private const string MultiVariateDataAnalysisProblemDataParameterName = "MultiVariateDataAnalysisProblem"; 37 37 public override Image ItemImage { 38 38 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; } 39 39 } 40 41 public string FileName { get; set; } 40 42 41 43 #region Parameter Properties -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblemData.cs
r4068 r4457 32 32 [Item("MultiVariateDataAnalysisProblemData", "Represents an item containing all data defining a multi-variate data analysis problem.")] 33 33 [StorableClass] 34 public class MultiVariateDataAnalysisProblemData : ParameterizedNamedItem {34 public class MultiVariateDataAnalysisProblemData : ParameterizedNamedItem, IStorableContent { 35 35 private bool suppressEvents = false; 36 public string FileName { get; set; } 36 37 #region default data 37 38 // y0 = x^4 + x^3 + x^2 + x -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblem.cs
r4118 r4457 33 33 [Creatable("Problems")] 34 34 [StorableClass] 35 public class DataAnalysisProblem : ParameterizedNamedItem, IDataAnalysisProblem {35 public class DataAnalysisProblem : ParameterizedNamedItem, IDataAnalysisProblem, IStorableContent { 36 36 private const string DataAnalysisProblemDataParameterName = "DataAnalysisProblemData"; 37 37 public override Image ItemImage { 38 38 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; } 39 39 } 40 41 public string FileName { get; set; } 40 42 41 43 #region Parameter Properties -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblemData.cs
r4341 r4457 33 33 [Item("DataAnalysisProblemData", "Represents an item containing all data defining a data analysis problem.")] 34 34 [StorableClass] 35 public class DataAnalysisProblemData : ParameterizedNamedItem {35 public class DataAnalysisProblemData : ParameterizedNamedItem, IStorableContent { 36 36 private bool suppressEvents = false; 37 38 #region IStorableContent Members 39 public string Filename { get; set; } 40 #endregion 41 37 42 #region default data 38 43 // y = x^4 + x^3 + x^2 + x -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs
r4401 r4457 33 33 [Item("DataAnalysisSolution", "Represents a solution for a data analysis problem which can be visualized in the GUI.")] 34 34 [StorableClass] 35 public abstract class DataAnalysisSolution : NamedItem { 35 public abstract class DataAnalysisSolution : NamedItem, IStorableContent { 36 #region IStorableContent Members 37 public string Filename { get; set; } 38 #endregion 39 40 36 41 protected DataAnalysisSolution() 37 42 : base() { }
Note: See TracChangeset
for help on using the changeset viewer.