Changeset 8430 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
- Timestamp:
- 08/08/12 14:04:17 (12 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
- Property svn:ignore
-
old new 20 20 bin 21 21 protoc.exe 22 _ReSharper.HeuristicLab.TimeSeries-3.3
-
- Property svn:ignore
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Views merged eligible /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Views merged eligible /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged eligible /branches/Benchmarking/sources/HeuristicLab.Problems.DataAnalysis.Views 6917-7005 /branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Views 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.DataAnalysis.Views 5815-6180 /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views 6284-6795 /branches/NET40/sources/HeuristicLab.Problems.DataAnalysis.Views 5138-5162 /branches/ParallelEngine/HeuristicLab.Problems.DataAnalysis.Views 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Problems.DataAnalysis.Views 6828 /branches/SuccessProgressAnalysis/HeuristicLab.Problems.DataAnalysis.Views 5370-5682 /branches/Trunk/HeuristicLab.Problems.DataAnalysis.Views 6829-6865 /branches/VNS/HeuristicLab.Problems.DataAnalysis.Views 5594-5752 /branches/histogram/HeuristicLab.Problems.DataAnalysis.Views 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
r7460 r8430 72 72 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].ChartType = SeriesChartType.FastLine; 73 73 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.Color = this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Color; 74 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndi zes.ToArray(), Content.EstimatedTrainingValues.ToArray());74 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndices.ToArray(), Content.EstimatedTrainingValues.ToArray()); 75 75 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME]); 76 76 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Tag = Content; … … 79 79 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].LegendText = ESTIMATEDVALUES_TEST_SERIES_NAME; 80 80 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].ChartType = SeriesChartType.FastLine; 81 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndi zes.ToArray(), Content.EstimatedTestValues.ToArray());81 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndices.ToArray(), Content.EstimatedTestValues.ToArray()); 82 82 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME]); 83 83 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Tag = Content; 84 84 // series of remaining points 85 int[] allIndi zes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();85 int[] allIndices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray(); 86 86 var estimatedValues = Content.EstimatedValues.ToArray(); 87 List<double> allEstimatedValues = allIndi zes.Select(index => estimatedValues[index]).ToList();87 List<double> allEstimatedValues = allIndices.Select(index => estimatedValues[index]).ToList(); 88 88 this.chart.Series.Add(ESTIMATEDVALUES_ALL_SERIES_NAME); 89 89 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME; 90 90 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine; 91 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndi zes, allEstimatedValues);91 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues); 92 92 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 93 93 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content; … … 170 170 171 171 int[] attr = new int[Content.ProblemData.Dataset.Rows + 1]; // add a virtual last row that is again empty to simplify loop further down 172 foreach (var row in Content.ProblemData.TrainingIndi zes) {172 foreach (var row in Content.ProblemData.TrainingIndices) { 173 173 attr[row] += 1; 174 174 } 175 foreach (var row in Content.ProblemData.TestIndi zes) {175 foreach (var row in Content.ProblemData.TestIndices) { 176 176 attr[row] += 2; 177 177 } … … 223 223 string targetVariableName = Content.ProblemData.TargetVariable; 224 224 225 IEnumerable<int> indi zes = null;225 IEnumerable<int> indices = null; 226 226 IEnumerable<double> predictedValues = null; 227 227 switch (series.Name) { 228 228 case ESTIMATEDVALUES_ALL_SERIES_NAME: 229 indi zes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();229 indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray(); 230 230 var estimatedValues = Content.EstimatedValues.ToArray(); 231 predictedValues = indi zes.Select(index => estimatedValues[index]).ToList();231 predictedValues = indices.Select(index => estimatedValues[index]).ToList(); 232 232 break; 233 233 case ESTIMATEDVALUES_TRAINING_SERIES_NAME: 234 indi zes = Content.ProblemData.TrainingIndizes.ToArray();234 indices = Content.ProblemData.TrainingIndices.ToArray(); 235 235 predictedValues = Content.EstimatedTrainingValues.ToArray(); 236 236 break; 237 237 case ESTIMATEDVALUES_TEST_SERIES_NAME: 238 indi zes = Content.ProblemData.TestIndizes.ToArray();238 indices = Content.ProblemData.TestIndices.ToArray(); 239 239 predictedValues = Content.EstimatedTestValues.ToArray(); 240 240 break; 241 241 } 242 series.Points.DataBindXY(indi zes, predictedValues);242 series.Points.DataBindXY(indices, predictedValues); 243 243 this.InsertEmptyPoints(series); 244 244 chart.Legends[series.Legend].ForeColor = Color.Black;
Note: See TracChangeset
for help on using the changeset viewer.