Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/22/10 12:14:38 (14 years ago)
Author:
mkommend
Message:

Added logic to remove the test samples from the training samples (ticket #939).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classification.Views/3.3/SymbolicClassificationSolutionView.cs

    r4417 r4469  
    134134
    135135    private void FillSeriesWithDataPoints(Series series) {
    136       int row = Content.ProblemData.TrainingSamplesStart.Value;
    137       foreach (double estimatedValue in Content.EstimatedTrainingValues) {
     136      List<double> estimatedValues = Content.EstimatedValues.ToList();
     137      foreach (int row in Content.ProblemData.TrainingIndizes) {
     138        double estimatedValue = estimatedValues[row];
    138139        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable.Value, row];
    139         if (targetValue == (double)series.Tag) {
     140        if (targetValue.IsAlmost((double)series.Tag)) {
    140141          double jitterValue = random.NextDouble() * 2.0 - 1.0;
    141142          DataPoint point = new DataPoint();
     
    145146          series.Points.Add(point);
    146147        }
    147         row++;
    148       }
    149 
    150       row = Content.ProblemData.TestSamplesStart.Value;
    151       foreach (double estimatedValue in Content.EstimatedTestValues) {
     148      }
     149
     150      foreach (int row in Content.ProblemData.TestIndizes) {
     151        double estimatedValue = estimatedValues[row];
    152152        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable.Value, row];
    153153        if (targetValue == (double)series.Tag) {
     
    159159          series.Points.Add(point);
    160160        }
    161         row++;
    162       }
     161      }
     162
    163163      UpdateCursorInterval();
    164164    }
Note: See TracChangeset for help on using the changeset viewer.