- Timestamp:
- 12/04/13 12:46:14 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
r10163 r10180 85 85 </Compile> 86 86 <Compile Include="Implementations\PreprocessingData.cs" /> 87 <Compile Include=" PreprocessingDataStatisticInfo.cs" />88 <Compile Include="Interfaces\I PreprocessingDataStatisticInfo.cs" />87 <Compile Include="StatisticInfo.cs" /> 88 <Compile Include="Interfaces\IStatisticInfo.cs" /> 89 89 <Compile Include="Interfaces\IPreprocessingData.cs" /> 90 90 <Compile Include="Plugin.cs" /> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IStatisticInfo.cs
r10178 r10180 2 2 using System; 3 3 namespace HeuristicLab.DataPreprocessing { 4 public interface I PreprocessingDataStatisticInfo {4 public interface IStatisticInfo { 5 5 6 6 int GetColumnCount(); … … 16 16 double GetMostCommonValue(int columnIndex); 17 17 double GetStandardDeviation(int columnIndex); 18 public int GetDifferentValuesCount<T>(int columnIndex); 18 19 } 19 20 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/StatisticInfo.cs
r10179 r10180 5 5 namespace HeuristicLab.DataPreprocessing { 6 6 7 class PreprocessingDataStatisticInfo : IPreprocessingDataStatisticInfo {7 class StatisticInfo : IStatisticInfo { 8 8 9 9 private IPreprocessingData preprocessingData; 10 10 11 public PreprocessingDataStatisticInfo(IPreprocessingData thePreprocessingData) {11 public StatisticInfo(IPreprocessingData thePreprocessingData) { 12 12 preprocessingData = thePreprocessingData; 13 13 } … … 80 80 81 81 public T GetMostCommonValue<T>(int columnIndex) { 82 83 .GroupBy( x => x)84 .OrderByDescending( g => g.Count())85 .Select( g => g.Key)86 82 return preprocessingData.GetValues<T>(columnIndex) 83 .GroupBy(x => x) 84 .OrderByDescending(g => g.Count()) 85 .Select(g => g.Key) 86 .First(); 87 87 } 88 88 … … 97 97 } 98 98 99 public int GetDifferentValue Count<T>(int columnIndex) {99 public int GetDifferentValuesCount<T>(int columnIndex) { 100 100 return preprocessingData.GetValues<T>(columnIndex).GroupBy(x => x).Count(); 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.