- Timestamp:
- 10/22/19 17:07:52 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.cs
r17180 r17341 93 93 var dateTimeVars = ds.DateTimeVariables.Where(vn => ds.GetDateTimeValues(vn).Distinct().Skip(1).Any()).ToArray(); 94 94 95 // produce training and test values separately as they might overlap (e.g. for ensembles) 96 var predictedValuesTrain = Content.EstimatedTrainingValues.ToArray(); 97 int j = 0; // idx for predictedValues array 98 foreach (var i in problemData.TrainingIndices) { 95 var predictedValues = Content.EstimatedValues.ToArray(); 96 foreach (var i in problemData.AllIndices) { 99 97 var run = CreateRunForIdx(i, problemData, doubleVars, stringVars, dateTimeVars); 100 98 var targetValue = ds.GetDoubleValue(problemData.TargetVariable, i); 101 AddErrors(run, predictedValuesTrain[j++], targetValue); 102 run.Results.Add(PartitionLabel, new StringValue("Training")); 103 run.Color = Color.Gold; 99 AddErrors(run, predictedValues[i], targetValue); 100 101 if (problemData.IsTrainingSample(i) && problemData.IsTestSample(i)) { 102 run.Results.Add(PartitionLabel, new StringValue("Training + Test")); 103 run.Color = Color.Orange; 104 } else if (problemData.IsTrainingSample(i)) { 105 run.Results.Add(PartitionLabel, new StringValue("Training")); 106 run.Color = Color.Gold; 107 } else if (problemData.IsTestSample(i)) { 108 run.Results.Add(PartitionLabel, new StringValue("Test")); 109 run.Color = Color.Red; 110 } else { 111 run.Results.Add(PartitionLabel, new StringValue("Additional Data")); 112 run.Color = Color.Black; 113 } 104 114 runs.Add(run); 105 115 } 106 var predictedValuesTest = Content.EstimatedTestValues.ToArray(); 107 j = 0; 108 foreach (var i in problemData.TestIndices) { 109 var run = CreateRunForIdx(i, problemData, doubleVars, stringVars, dateTimeVars); 110 var targetValue = ds.GetDoubleValue(problemData.TargetVariable, i); 111 AddErrors(run, predictedValuesTest[j++], targetValue); 112 run.Results.Add(PartitionLabel, new StringValue("Test")); 113 run.Color = Color.Red; 114 runs.Add(run); 115 } 116 116 117 if (string.IsNullOrEmpty(selectedXAxis)) 117 118 selectedXAxis = "Index";
Note: See TracChangeset
for help on using the changeset viewer.