Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/04/13 14:18:42 (11 years ago)
Author:
rstoll
Message:

Added GetMissingValueIndices to IPreprocessingData since it will be used in many places
Removed columnIndex specific method from PreprocessingData

File:
1 edited

Legend:

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

    r10183 r10189  
    4343
    4444    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();
    5446    }
    5547
Note: See TracChangeset for help on using the changeset viewer.