- Timestamp:
- 11/27/13 17:09:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/PreprocessingDataStatisticInfo.cs
r10166 r10167 2 2 using System.Linq; 3 3 using HeuristicLab.DataPreprocessing.Interfaces; 4 using System.Linq;5 4 6 5 namespace HeuristicLab.DataPreprocessing { … … 80 79 } 81 80 82 public double GetMostCommonValue(int columnIndex) { 83 double result = 0; 84 for (int i = 0; i < preprocessingData.Rows; ++i) { 81 public T GetMostCommonValue<T>(int columnIndex) { 82 return preprocessingData.GetValues<T>(columnIndex) 83 .GroupBy( x => x ) 84 .OrderByDescending( g => g.Count() ) 85 .Select( g => g.Key ) 86 .First(); 87 } 85 88 86 }87 return result;88 }89 89 90 90 public double GetStandardDeviation(int columnIndex) {
Note: See TracChangeset
for help on using the changeset viewer.