Changeset 14772
- Timestamp:
- 03/21/17 18:17:14 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ConfidenceRegressionSolutionEstimatedValuesView.cs
r14185 r14772 61 61 foreach (var row in Enumerable.Range(0, Content.ProblemData.Dataset.Rows)) { 62 62 estimated_var.MoveNext(); 63 matrix[row, 7] = estimated_var.Current.ToString();63 matrix[row, 8] = estimated_var.Current.ToString(); 64 64 } 65 65 66 66 foreach (var row in Content.ProblemData.TrainingIndices) { 67 67 estimated_var_training.MoveNext(); 68 matrix[row, 8] = estimated_var_training.Current.ToString();68 matrix[row, 9] = estimated_var_training.Current.ToString(); 69 69 } 70 70 71 71 foreach (var row in Content.ProblemData.TestIndices) { 72 72 estimated_var_test.MoveNext(); 73 matrix[row, 9] = estimated_var_test.Current.ToString();73 matrix[row, 10] = estimated_var_test.Current.ToString(); 74 74 } 75 75 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs
r14185 r14772 81 81 82 82 protected virtual StringMatrix CreateValueMatrix() { 83 string[,] values = new string[Content.ProblemData.Dataset.Rows, 7];83 string[,] values = new string[Content.ProblemData.Dataset.Rows, 8]; 84 84 85 85 double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray(); … … 101 101 estimated.MoveNext(); 102 102 double est = estimated.Current; 103 double res = Math.Abs(est - target[row]);103 double res = target[row] - est; 104 104 values[row, 0] = row.ToString(); 105 105 values[row, 1] = target[row].ToString(); 106 106 values[row, 2] = est.ToString(); 107 values[row, 5] = Math.Abs(res).ToString(); 108 values[row, 6] = Math.Abs(res / target[row]).ToString(); 107 values[row, 5] = res.ToString(); 108 values[row, 6] = Math.Abs(res).ToString(); 109 values[row, 7] = Math.Abs(res / target[row]).ToString(); 109 110 } 110 111 111 112 var matrix = new StringMatrix(values); 112 matrix.ColumnNames = new string[] { "Id", TARGETVARIABLE_SERIES_NAME, ESTIMATEDVALUES_SERIES_NAME, ESTIMATEDVALUES_TRAINING_SERIES_NAME, ESTIMATEDVALUES_TEST_SERIES_NAME, " Absolute Error (all)", "Relative Error (all)" };113 matrix.ColumnNames = new string[] { "Id", TARGETVARIABLE_SERIES_NAME, ESTIMATEDVALUES_SERIES_NAME, ESTIMATEDVALUES_TRAINING_SERIES_NAME, ESTIMATEDVALUES_TEST_SERIES_NAME, "Residuals (all)", "Absolute Error (all)", "Relative Error (all)" }; 113 114 matrix.SortableView = true; 114 115 return matrix;
Note: See TracChangeset
for help on using the changeset viewer.