- Timestamp:
- 04/02/14 14:50:03 (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/ManipulationLogic.cs
r10709 r10711 255 255 }); 256 256 } 257 258 259 public void DeleteRowsWithMissingValuesGreater(double percent) { 260 for (int i = 0; i < preprocessingData.Rows; ++i) { 261 int missingCount = statisticsLogic.GetRowMissingValueCount(i); 262 if (100f / preprocessingData.Columns * missingCount >= percent) { 263 preprocessingData.DeleteRow(i); 264 --i; 265 } 266 } 267 } 268 269 public void DeleteColumnsWithMissingValuesGreater(float percent) { 270 for (int i = 0; i < preprocessingData.Columns; ++i) { 271 int missingCount = statisticsLogic.GetMissingValueCount(i); 272 if (100f / preprocessingData.Columns * missingCount >= percent) { 273 preprocessingData.DeleteColumn(i); 274 --i; 275 } 276 } 277 } 278 279 public void DeleteColumnsWithVarianceSmaller(double variance) { 280 for (int i = 0; i < preprocessingData.Columns; ++i) { 281 if (preprocessingData.IsType<double>(i) || preprocessingData.IsType<DateTime>(i)) { 282 double columnVariance = statisticsLogic.GetVariance(i); 283 if (columnVariance < variance) { 284 preprocessingData.DeleteColumn(i); 285 --i; 286 } 287 } 288 } 289 } 290 257 291 } 258 292 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/TransformationLogic.cs
r10586 r10711 20 20 #endregion 21 21 22 using System;23 22 24 23 namespace HeuristicLab.DataPreprocessing { … … 36 35 } 37 36 38 public void DeleteRowsWithMissingValuesGreater(double percent) {39 for (int i = 0; i < preprocessingData.Rows; ++i) {40 int missingCount = statisticsLogic.GetRowMissingValueCount(i);41 if (100f / preprocessingData.Columns * missingCount >= percent) {42 preprocessingData.DeleteRow(i);43 --i;44 }45 }46 }47 48 public void DeleteColumnsWithMissingValuesGreater(float percent) {49 for (int i = 0; i < preprocessingData.Columns; ++i) {50 int missingCount = statisticsLogic.GetMissingValueCount(i);51 if (100f / preprocessingData.Columns * missingCount >= percent) {52 preprocessingData.DeleteColumn(i);53 --i;54 }55 }56 }57 58 public void DeleteColumnsWithVarianceSmaller(double variance) {59 for (int i = 0; i < preprocessingData.Columns; ++i) {60 if (preprocessingData.IsType<double>(i) || preprocessingData.IsType<DateTime>(i)) {61 double columnVariance = statisticsLogic.GetVariance(i);62 if (columnVariance < variance) {63 preprocessingData.DeleteColumn(i);64 --i;65 }66 }67 }68 }69 70 37 } 71 38 }
Note: See TracChangeset
for help on using the changeset viewer.