Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/21/17 18:17:14 (8 years ago)
Author:
mkommend
Message:

#2750: Added residuals to estiamted values view for regression solutions.

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  
    6161      foreach (var row in Enumerable.Range(0, Content.ProblemData.Dataset.Rows)) {
    6262        estimated_var.MoveNext();
    63         matrix[row, 7] = estimated_var.Current.ToString();
     63        matrix[row, 8] = estimated_var.Current.ToString();
    6464      }
    6565
    6666      foreach (var row in Content.ProblemData.TrainingIndices) {
    6767        estimated_var_training.MoveNext();
    68         matrix[row, 8] = estimated_var_training.Current.ToString();
     68        matrix[row, 9] = estimated_var_training.Current.ToString();
    6969      }
    7070
    7171      foreach (var row in Content.ProblemData.TestIndices) {
    7272        estimated_var_test.MoveNext();
    73         matrix[row, 9] = estimated_var_test.Current.ToString();
     73        matrix[row, 10] = estimated_var_test.Current.ToString();
    7474      }
    7575
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs

    r14185 r14772  
    8181
    8282    protected virtual StringMatrix CreateValueMatrix() {
    83       string[,] values = new string[Content.ProblemData.Dataset.Rows, 7];
     83      string[,] values = new string[Content.ProblemData.Dataset.Rows, 8];
    8484
    8585      double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
     
    101101        estimated.MoveNext();
    102102        double est = estimated.Current;
    103         double res = Math.Abs(est - target[row]);
     103        double res = target[row] - est;
    104104        values[row, 0] = row.ToString();
    105105        values[row, 1] = target[row].ToString();
    106106        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();
    109110      }
    110111
    111112      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)" };
    113114      matrix.SortableView = true;
    114115      return matrix;
Note: See TracChangeset for help on using the changeset viewer.