Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/14 13:19:42 (10 years ago)
Author:
sbreuer
Message:
  • provide default value (false) for considerSelection parameter
File:
1 edited

Legend:

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

    r10809 r10811  
    129129      double stdDev = double.NaN;
    130130      if (preprocessingData.IsType<double>(columnIndex)) {
    131         stdDev = GetValuesWithoutNaN<double>(columnIndex, false).StandardDeviation();
     131        stdDev = GetValuesWithoutNaN<double>(columnIndex).StandardDeviation();
    132132      } else if (preprocessingData.IsType<DateTime>(columnIndex)) {
    133         stdDev = GetDateTimeAsSeconds(columnIndex, false).StandardDeviation();
     133        stdDev = GetDateTimeAsSeconds(columnIndex).StandardDeviation();
    134134      }
    135135      return stdDev;
     
    139139      double variance = double.NaN;
    140140      if (preprocessingData.IsType<double>(columnIndex)) {
    141         variance = preprocessingData.GetValues<double>(columnIndex, false).Variance();
     141        variance = preprocessingData.GetValues<double>(columnIndex).Variance();
    142142      } else if (preprocessingData.IsType<DateTime>(columnIndex)) {
    143         variance = GetDateTimeAsSeconds(columnIndex, false).Variance();
     143        variance = GetDateTimeAsSeconds(columnIndex).Variance();
    144144      }
    145145      return variance;
     
    147147
    148148    public int GetDifferentValuesCount<T>(int columnIndex) {
    149       return preprocessingData.GetValues<T>(columnIndex, false).GroupBy(x => x).Count();
     149      return preprocessingData.GetValues<T>(columnIndex).GroupBy(x => x).Count();
    150150    }
    151151
     
    179179    }
    180180
    181     private IEnumerable<double> GetDateTimeAsSeconds(int columnIndex, bool considerSelection) {
     181    private IEnumerable<double> GetDateTimeAsSeconds(int columnIndex, bool considerSelection = false) {
    182182      return GetValuesWithoutNaN<DateTime>(columnIndex, considerSelection).Select(x => (double)x.Ticks / TimeSpan.TicksPerSecond);
    183183    }
    184184
    185     private IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection) {
     185    private IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection = false) {
    186186      return searchLogic.GetValuesWithoutNaN<T>(columnIndex, considerSelection);
    187187    }
Note: See TracChangeset for help on using the changeset viewer.