Changeset 10166
- Timestamp:
- 11/27/13 16:37:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/PreprocessingDataStatisticInfo.cs
r10165 r10166 2 2 using System.Linq; 3 3 using HeuristicLab.DataPreprocessing.Interfaces; 4 using System.Linq; 4 5 5 6 namespace HeuristicLab.DataPreprocessing { … … 64 65 65 66 public double GetMedian(int columnIndex) { 66 throw new System.NotImplementedException(); 67 double median = double.NaN; 68 if (preprocessingData.IsType<double>(columnIndex)) { 69 median = preprocessingData.GetValues<double>(columnIndex).OrderBy(x => x).ElementAt(preprocessingData.Rows / 2); 70 } 71 return median; 67 72 } 68 73 69 74 public double GetAverage(int columnIndex) { 70 throw new System.NotImplementedException(); 75 double avg = double.NaN; 76 if (preprocessingData.IsType<double>(columnIndex)) { 77 avg = preprocessingData.GetValues<double>(columnIndex).Average(); 78 } 79 return avg; 71 80 } 72 81
Note: See TracChangeset
for help on using the changeset viewer.