Changeset 7154 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis
- Timestamp:
- 12/07/11 22:47:12 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionLineChartView.cs
r7129 r7154 91 91 this.chart.Series[PROGNOSEDVALUES_TRAINING_SERIES_NAME].Points 92 92 .DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), 93 Content.PrognosedTrainingValues. ElementAt(varIndex).ToArray());93 Content.PrognosedTrainingValues.SelectMany(x => x).Skip(varIndex).TakeEvery(Content.ProblemData.TargetVariables.Count()).ToArray()); 94 94 } else { 95 95 this.chart.Series[PROGNOSEDVALUES_TRAINING_SERIES_NAME].Points 96 96 .DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), 97 Content.GetPrognosedValues(Content.ProblemData.TrainingIndizes, 1).Select (v => v.ElementAt(varIndex).First()).ToArray());97 Content.GetPrognosedValues(Content.ProblemData.TrainingIndizes, 1).SelectMany(x => x.Single()).Skip(varIndex).TakeEvery(Content.ProblemData.TargetVariables.Count()).ToArray()); 98 98 } 99 99 this.chart.Series[PROGNOSEDVALUES_TRAINING_SERIES_NAME].Tag = Content; … … 109 109 this.chart.Series[PROGNOSEDVALUES_TEST_SERIES_NAME].Points 110 110 .DataBindXY(Content.ProblemData.TestIndizes.ToArray(), 111 Content.PrognosedTestValues. ElementAt(varIndex).ToArray());111 Content.PrognosedTestValues.SelectMany(x => x).Skip(varIndex).TakeEvery(Content.ProblemData.TargetVariables.Count()).ToArray()); 112 112 } else { 113 113 this.chart.Series[PROGNOSEDVALUES_TEST_SERIES_NAME].Points 114 114 .DataBindXY(Content.ProblemData.TestIndizes.ToArray(), 115 Content.GetPrognosedValues(Content.ProblemData.TestIndizes, 1).Select( 116 v => v.ElementAt(varIndex).First()).ToArray()); 115 Content.GetPrognosedValues(Content.ProblemData.TestIndizes, 1).SelectMany(x => x.Single()).Skip(varIndex).TakeEvery(Content.ProblemData.TargetVariables.Count()).ToArray()); 117 116 } 118 117 this.chart.Series[PROGNOSEDVALUES_TEST_SERIES_NAME].Tag = Content; … … 242 241 case PROGNOSEDVALUES_TRAINING_SERIES_NAME: 243 242 indizes = Content.ProblemData.TrainingIndizes.ToArray(); 244 predictedValues = Content.PrognosedTrainingValues.ElementAt(varIndex).ToArray(); 243 predictedValues = 244 Content.PrognosedTrainingValues.SelectMany(x => x).Skip(varIndex).TakeEvery( 245 Content.ProblemData.TargetVariables.Count()).ToArray(); 245 246 break; 246 247 case PROGNOSEDVALUES_TEST_SERIES_NAME: 247 248 indizes = Content.ProblemData.TestIndizes.ToArray(); 248 predictedValues = Content.PrognosedTestValues.ElementAt(varIndex).ToArray(); 249 Content.PrognosedTestValues.SelectMany(x => x).Skip(varIndex).TakeEvery( 250 Content.ProblemData.TargetVariables.Count()).ToArray(); 249 251 break; 250 252 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionPrognosedValuesView.cs
r7100 r7154 93 93 values[row, 0] = row.ToString(); 94 94 95 var prognosedTraining = Content.PrognosedTrainingValues.ToArray();96 var prognosedTest = Content.PrognosedTestValues.ToArray();95 var allPrognosedTraining = Content.PrognosedTrainingValues.SelectMany(x=>x).ToArray(); 96 var allPrognosedTest = Content.PrognosedTestValues.SelectMany(x => x).ToArray(); 97 97 98 98 int i = 0; 99 99 int targetVariableIndex = 0; 100 100 foreach (var targetVariable in Content.ProblemData.TargetVariables) { 101 var prognosedTraining = 102 allPrognosedTraining.Skip(targetVariableIndex).TakeEvery(Content.ProblemData.TargetVariables.Count()); 103 var prognosedTest = 104 allPrognosedTest.Skip(targetVariableIndex).TakeEvery(Content.ProblemData.TargetVariables.Count()); 105 101 106 double[] target = Content.ProblemData.Dataset.GetDoubleValues(targetVariable).ToArray(); 102 107 103 var prognosedTrainingEnumerator = prognosedTraining [targetVariableIndex].GetEnumerator();108 var prognosedTrainingEnumerator = prognosedTraining.GetEnumerator(); 104 109 foreach (var row in Content.ProblemData.TrainingIndizes) { 105 110 prognosedTrainingEnumerator.MoveNext(); … … 107 112 } 108 113 109 var prognosedTestEnumerator = prognosedTest [targetVariableIndex].GetEnumerator();114 var prognosedTestEnumerator = prognosedTest.GetEnumerator(); 110 115 foreach (var row in Content.ProblemData.TestIndizes) { 111 116 prognosedTestEnumerator.MoveNext();
Note: See TracChangeset
for help on using the changeset viewer.