Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/09 13:32:19 (15 years ago)
Author:
gkronber
Message:

Fixed a bug in the variable impact calculation operators. #750.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs

    r2367 r2368  
    308308      return min;
    309309    }
     310
     311    public int CountMissingValues(string variableName) {
     312      return CountMissingValues(this.GetVariableIndex(variableName));
     313    }
     314    public int CountMissingValues(int column) {
     315      return CountMissingValues(column, 0, Rows);
     316    }
     317
     318    public int CountMissingValues(string variableName, int start, int end) {
     319      return CountMissingValues(this.GetVariableIndex(variableName), start, end);
     320    }
     321
     322    public int CountMissingValues(int column, int start, int end) {
     323      int n = 0;
     324      for (int i = start; i < end; i++) {
     325        double val = GetValue(i, column);
     326        if (double.IsNaN(val)) n++;
     327      }
     328      return n;
     329    }
     330
    310331    #endregion
    311332
Note: See TracChangeset for help on using the changeset viewer.