# Changeset 13051

Ignore:
Timestamp:
10/22/15 19:12:29 (4 years ago)
Message:

#2491: removed usage of Percentile extension method

Location:
trunk/sources
Files:
5 edited

Unmodified
Removed
• ## trunk/sources/HeuristicLab.Analysis.Statistics.Views/3.3/ChartAnalysisView.cs

 r12631 double stdDev = values.StandardDeviation(); double variance = values.Variance(); double percentile25 = values.Percentile(0.25); double percentile75 = values.Percentile(0.75); double percentile25 = values.Quantile(0.25); double percentile75 = values.Quantile(0.75); double lowerAvg = values.Count() > 4 ? values.OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average() : double.NaN; double upperAvg = values.Count() > 4 ? values.OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average() : double.NaN;
• ## trunk/sources/HeuristicLab.Analysis.Statistics.Views/3.3/SampleSizeInfluenceView.cs

 r12690 matrix[5, i] = seriesValues.StandardDeviation(); matrix[6, i] = seriesValues.Variance(); matrix[7, i] = seriesValues.Percentile(0.25); matrix[8, i] = seriesValues.Percentile(0.75); matrix[7, i] = seriesValues.Quantile(0.25); matrix[8, i] = seriesValues.Quantile(0.75); matrix[9, i] = confIntervals.Item1; matrix[10, i] = confIntervals.Item2;
• ## trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs

 r13034 // Numerical Recipes in C++, §8.5 Selecting the Mth Largest, O(n) // Giben k in [0..n-1] returns an array value from array arr[0..n-1] such that k array values are // Given k in [0..n-1] returns an array value from array arr[0..n-1] such that k array values are // lee than or equal to the one returned. The input array will be rearranged to hav this value in // location arr[k], with all smaller elements moved to arr[0..k-1] (in arbitrary order) and all // larger elements in arr[k+1..n-1] (also in arbitrary order). // // Could be changed to Select where T is IComparable but in this case is significantly slower for double values private static double Select(int k, double[] arr) { Contract.Assert(arr.GetLowerBound(0) == 0); } /// /// Calculates the pth percentile of the values. /// public static double Percentile(this IEnumerable values, double p) { // percentiles are actually quantiles where alpha is constrained to integer percentage values from 1% to 99% return Quantile(values, p); } public static IEnumerable LimitToRange(this IEnumerable values, double min, double max) { if (min > max) throw new ArgumentException(string.Format("Minimum {0} is larger than maximum {1}.", min, max));
• ## trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs

 r12889 double percentile = double.NaN; if (preprocessingData.VariableHasType(columnIndex)) { percentile = GetValuesWithoutNaN(columnIndex).Percentile(0.25); } else if (preprocessingData.VariableHasType(columnIndex)) { percentile = GetDateTimeAsSeconds(columnIndex).Percentile(0.25); percentile = GetValuesWithoutNaN(columnIndex).Quantile(0.25); } else if (preprocessingData.VariableHasType(columnIndex)) { percentile = GetDateTimeAsSeconds(columnIndex).Quantile(0.25); } return percentile; double percentile = double.NaN; if (preprocessingData.VariableHasType(columnIndex)) { percentile = GetValuesWithoutNaN(columnIndex).Percentile(0.75); } else if (preprocessingData.VariableHasType(columnIndex)) { percentile = GetDateTimeAsSeconds(columnIndex).Percentile(0.75); percentile = GetValuesWithoutNaN(columnIndex).Quantile(0.75); } else if (preprocessingData.VariableHasType(columnIndex)) { percentile = GetDateTimeAsSeconds(columnIndex).Quantile(0.75); } return percentile;
• ## trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs

 r12787 matrix[5, i] = seriesValues.StandardDeviation(); matrix[6, i] = seriesValues.Variance(); matrix[7, i] = seriesValues.Percentile(0.25); matrix[8, i] = seriesValues.Percentile(0.75); matrix[7, i] = seriesValues.Quantile(0.25); matrix[8, i] = seriesValues.Quantile(0.75); } statisticsMatrixView.Content = matrix;
Note: See TracChangeset for help on using the changeset viewer.