Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10235


Ignore:
Timestamp:
12/18/13 13:15:29 (10 years ago)
Author:
pfleck
Message:

Fixed bug with partition range.

Location:
branches/DataPreprocessing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs

    r10221 r10235  
    3636
    3737    private IList<string> variableNames;
    38     private IntRange trainingPartition;
    39     private IntRange testPartition;
    4038
    4139    private IDictionary<string, int> variableNameIndices;
     
    7573      }
    7674
    77       trainingPartition = problemData.TrainingPartition;
    78       testPartition = problemData.TestPartition;
    79 
    80       trainingToTestRatio = (double)problemData.TrainingPartition.Size / problemData.TestPartition.Size;
     75      trainingToTestRatio = (double)problemData.TrainingPartition.Size / Math.Max(problemData.Dataset.Rows, double.Epsilon);
    8176    }
    8277
     
    147142
    148143    public IntRange TestPartition {
    149       get { return new IntRange((int)(Rows * trainingToTestRatio), Math.Max(Rows - 1, 0)); }
     144      get { return new IntRange((int)(Rows * trainingToTestRatio), Rows); }
    150145    }
    151146
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs

    r10221 r10235  
    107107
    108108      // TODO: ProblemDataView depends on DataPreprocessing
     109      //ApplicationManager.Manager.GetInstances<IPreprocessingContext>();
    109110      var context = new PreprocessingContext(preprocessingData, parentItem, Content);
    110111      MainFormManager.MainForm.ShowContent(context);
Note: See TracChangeset for help on using the changeset viewer.