Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7327


Ignore:
Timestamp:
01/13/12 18:16:11 (13 years ago)
Author:
bburlacu
Message:

#1756: Fixed speed issue in RegressionSolutionLineChartView. The problem was an unnecessary call to the InsertEmptyPoints procedure. The MSDN website (http://msdn.microsoft.com/en-us/library/dd456677.aspx) specifies the context in which this method is useful: when the data points have no Y value. In our case however there are no such points, so by removed the calls the performance becomes similar to the scatter plot (which also does not insert empty points).

File:
1 edited

Legend:

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

    r7259 r7327  
    6868        this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(),
    6969          Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray());
    70 
     70        // training series
    7171        this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME);
    7272        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].LegendText = ESTIMATEDVALUES_TRAINING_SERIES_NAME;
     
    7474        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), Content.EstimatedTrainingValues.ToArray());
    7575        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Tag = Content;
    76         this.chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, ESTIMATEDVALUES_TRAINING_SERIES_NAME);
    77         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.BorderWidth = 0;
    78         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.MarkerStyle = MarkerStyle.None;
    79 
    80 
     76        // test series
    8177        this.chart.Series.Add(ESTIMATEDVALUES_TEST_SERIES_NAME);
    8278        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].LegendText = ESTIMATEDVALUES_TEST_SERIES_NAME;
     
    8480        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndizes.ToArray(), Content.EstimatedTestValues.ToArray());
    8581        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Tag = Content;
    86 
    87 
     82        // series of remaining points
    8883        int[] allIndizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();
    8984        var estimatedValues = Content.EstimatedValues.ToArray();
     
    9590        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndizes, allEstimatedValues);
    9691        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content;
    97         this.chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, ESTIMATEDVALUES_ALL_SERIES_NAME);
    98         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.BorderWidth = 0;
    99         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.MarkerStyle = MarkerStyle.None;
    10092        this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
    10193
Note: See TracChangeset for help on using the changeset viewer.