Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/13/15 20:57:14 (8 years ago)
Author:
gkronber
Message:

#2467: merged r12889 from trunk to stable branch

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.DataPreprocessing/3.4

  • stable/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs

    r12718 r13149  
    163163    }
    164164
     165    public double GetOneQuarterPercentile(int columnIndex) {
     166      double percentile = double.NaN;
     167      if (preprocessingData.VariableHasType<double>(columnIndex)) {
     168        percentile = GetValuesWithoutNaN<double>(columnIndex).Percentile(0.25);
     169      } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
     170        percentile = GetDateTimeAsSeconds(columnIndex).Percentile(0.25);
     171      }
     172      return percentile;
     173    }
     174
     175    public double GetThreeQuarterPercentile(int columnIndex) {
     176      double percentile = double.NaN;
     177      if (preprocessingData.VariableHasType<double>(columnIndex)) {
     178        percentile = GetValuesWithoutNaN<double>(columnIndex).Percentile(0.75);
     179      } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
     180        percentile = GetDateTimeAsSeconds(columnIndex).Percentile(0.75);
     181      }
     182      return percentile;
     183    }
     184
    165185    public int GetDifferentValuesCount<T>(int columnIndex) {
    166186      return preprocessingData.GetValues<T>(columnIndex).GroupBy(x => x).Count();
Note: See TracChangeset for help on using the changeset viewer.