Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11367 for trunk/sources


Ignore:
Timestamp:
09/15/14 12:46:48 (10 years ago)
Author:
gkronber
Message:

#2216 fixed a bug in the display of the baseline curve in the error characteristic curve view and simplified code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r11171 r11367  
    105105
    106106      if (Content.ProblemData.TrainingIndices.Any()) {
    107         var constantModel = CreateConstantModel();
    108         var originalValues = GetOriginalValues().ToList();
    109         var baselineEstimatedValues = GetEstimatedValues(constantModel);
    110         var baselineResiduals = GetResiduals(originalValues, baselineEstimatedValues);
    111 
    112         Series baselineSeries = new Series("Baseline");
    113         baselineSeries.ChartType = SeriesChartType.FastLine;
    114         UpdateSeries(baselineResiduals, baselineSeries);
    115         baselineSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(baselineSeries);
    116         baselineSeries.Tag = constantModel;
    117         baselineSeries.LegendToolTip = "Double-click to open model";
    118         chart.Series.Add(baselineSeries);
     107        AddRegressionSolution(CreateConstantSolution());
    119108      }
    120109
     
    239228    }
    240229
    241     private IRegressionSolution CreateConstantModel() {
     230    private ConstantRegressionSolution CreateConstantSolution() {
    242231      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average();
    243232      var model = new ConstantRegressionModel(averageTrainingTarget);
Note: See TracChangeset for help on using the changeset viewer.