- Timestamp:
- 12/18/13 13:15:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
r10221 r10235 36 36 37 37 private IList<string> variableNames; 38 private IntRange trainingPartition;39 private IntRange testPartition;40 38 41 39 private IDictionary<string, int> variableNameIndices; … … 75 73 } 76 74 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); 81 76 } 82 77 … … 147 142 148 143 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); } 150 145 } 151 146
Note: See TracChangeset
for help on using the changeset viewer.