- Timestamp:
- 12/11/13 17:21:25 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
r10219 r10221 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Problems.DataAnalysis; 24 25 25 26 namespace HeuristicLab.DataPreprocessing { 26 27 [Item("PreprocessingContext", "PreprocessingContext")] 27 28 public class PreprocessingContext : Item, IPreprocessingContext { 28 public PreprocessingContext(IPreprocessingData data, IItem parentItem ) {29 public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData) { 29 30 Data = data; 30 31 ParentItem = parentItem; 32 DataAnalysisProblemData = dataAnalysisProblemData; 31 33 } 32 34 … … 35 37 Data = cloner.Clone(original.Data); 36 38 ParentItem = original.ParentItem; 39 DataAnalysisProblemData = original.DataAnalysisProblemData; 37 40 } 38 41 … … 44 47 public IItem ParentItem { get; private set; } 45 48 49 public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; } 50 46 51 public override IDeepCloneable Clone(Cloner cloner) { 47 52 return new PreprocessingContext(this, cloner); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
r10220 r10221 142 142 } 143 143 144 public IntRange TrainingPartition { 145 get { return new IntRange(0, (int)(Rows * trainingToTestRatio)); } 146 } 147 148 public IntRange TestPartition { 149 get { return new IntRange((int)(Rows * trainingToTestRatio), Math.Max(Rows - 1, 0)); } 150 } 151 144 152 public IEnumerable<string> VariableNames { 145 153 get { return variableNames; } … … 155 163 156 164 public int Rows { 157 get { return variableValues .Count; }165 get { return variableValues[variableNames[0]].Count; } 158 166 } 159 167 public IDictionary<string, IEnumerable<int>> GetMissingValueIndices() {
Note: See TracChangeset
for help on using the changeset viewer.