- Timestamp:
- 06/24/16 14:00:28 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs
r13508 r13935 85 85 foreach (var column in cells) { 86 86 if (preprocessingData.VariableHasType<double>(column.Key)) { 87 double max = statisticsLogic.GetMax<double>(column.Key, considerSelection);88 double min = statisticsLogic.GetMin<double>(column.Key, considerSelection);87 double max = statisticsLogic.GetMax<double>(column.Key, double.NaN, considerSelection); 88 double min = statisticsLogic.GetMin<double>(column.Key, double.NaN, considerSelection); 89 89 double randMultiplier = (max - min); 90 90 foreach (int index in column.Value) { … … 93 93 } 94 94 } else if (preprocessingData.VariableHasType<DateTime>(column.Key)) { 95 DateTime min = statisticsLogic.GetMin<DateTime>(column.Key, considerSelection);96 DateTime max = statisticsLogic.GetMax<DateTime>(column.Key, considerSelection);95 DateTime min = statisticsLogic.GetMin<DateTime>(column.Key, DateTime.MinValue, considerSelection); 96 DateTime max = statisticsLogic.GetMax<DateTime>(column.Key, DateTime.MinValue, considerSelection); 97 97 double randMultiplier = (max - min).TotalSeconds; 98 98 foreach (int index in column.Value) { … … 213 213 foreach (var column in cells) { 214 214 if (preprocessingData.VariableHasType<double>(column.Key)) { 215 ReplaceIndicesByValue<double>(column.Key, column.Value, statisticsLogic.GetMostCommonValue<double>(column.Key, considerSelection));215 ReplaceIndicesByValue<double>(column.Key, column.Value, statisticsLogic.GetMostCommonValue<double>(column.Key, double.NaN, considerSelection)); 216 216 } else if (preprocessingData.VariableHasType<string>(column.Key)) { 217 ReplaceIndicesByValue<string>(column.Key, column.Value, statisticsLogic.GetMostCommonValue<string>(column.Key, considerSelection));217 ReplaceIndicesByValue<string>(column.Key, column.Value, statisticsLogic.GetMostCommonValue<string>(column.Key, string.Empty, considerSelection)); 218 218 } else if (preprocessingData.VariableHasType<DateTime>(column.Key)) { 219 ReplaceIndicesByValue<DateTime>(column.Key, column.Value, statisticsLogic.GetMostCommonValue<DateTime>(column.Key, considerSelection));219 ReplaceIndicesByValue<DateTime>(column.Key, column.Value, statisticsLogic.GetMostCommonValue<DateTime>(column.Key, DateTime.MinValue, considerSelection)); 220 220 } else { 221 221 throw new ArgumentException("column with index: " + column.Key + " contains a non supported type.");
Note: See TracChangeset
for help on using the changeset viewer.