Ignore:
Timestamp:
07/09/14 10:37:01 (8 years ago)
Author:
gkronber
Message:

#2206: made several changes / improvements to the data-preprocessing code while reviewing the code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/SearchLogic.cs

    r11002 r11156  
    8585
    8686    public bool IsMissingValue(int columnIndex, int rowIndex) {
    87       if (preprocessingData.IsType<double>(columnIndex)) {
     87      if (preprocessingData.VariableHasType<double>(columnIndex)) {
    8888        return double.IsNaN(preprocessingData.GetCell<double>(columnIndex, rowIndex));
    89       } else if (preprocessingData.IsType<string>(columnIndex)) {
     89      } else if (preprocessingData.VariableHasType<string>(columnIndex)) {
    9090        return string.IsNullOrEmpty(preprocessingData.GetCell<string>(columnIndex, rowIndex));
    91       } else if (preprocessingData.IsType<DateTime>(columnIndex)) {
     91      } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
    9292        return preprocessingData.GetCell<DateTime>(columnIndex, rowIndex).Equals(DateTime.MinValue);
    9393      } else {
     
    9898    public IList<int> GetMissingValueIndices(int columnIndex) {
    9999      if (!MissingValueIndicies.ContainsKey(columnIndex)){       
    100           if (preprocessingData.IsType<double>(columnIndex)) {
     100          if (preprocessingData.VariableHasType<double>(columnIndex)) {
    101101            MissingValueIndicies[columnIndex] = GetMissingValueIndices<double>(columnIndex);
    102           } else if (preprocessingData.IsType<string>(columnIndex)) {
     102          } else if (preprocessingData.VariableHasType<string>(columnIndex)) {
    103103            MissingValueIndicies[columnIndex] = GetMissingValueIndices<string>(columnIndex);
    104           } else if (preprocessingData.IsType<DateTime>(columnIndex)) {
     104          } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
    105105            MissingValueIndicies[columnIndex] = GetMissingValueIndices<DateTime>(columnIndex);
    106106          } else {
Note: See TracChangeset for help on using the changeset viewer.