Changeset 10189 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs
- Timestamp:
- 12/04/13 14:18:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs
r10183 r10189 43 43 44 44 public int GetMissingValueCount(string variableName) { 45 if (preprocessingData.IsType<double>(variableName)) { 46 return preprocessingData.GetValues<double>(variableName).Count(x => double.IsNaN(x)); 47 } else if (preprocessingData.IsType<string>(variableName)) { 48 return preprocessingData.GetValues<string>(variableName).Count(x => string.IsNullOrEmpty(x)); 49 } else if (preprocessingData.IsType<DateTime>(variableName)) { 50 return preprocessingData.GetValues<DateTime>(variableName).Count(x => x.Equals(DateTime.MinValue)); 51 } else { 52 throw new ArgumentException("column with index: " + variableName + " contains a non supported type."); 53 } 45 return preprocessingData.GetMissingValueIndices(variableName).Count(); 54 46 } 55 47
Note: See TracChangeset
for help on using the changeset viewer.