Ignore:
Timestamp:
07/14/16 22:41:02 (5 years ago)
Author:
mkommend
Message:

#2616: Merged r13934, r13935 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.DataPreprocessing/3.4

  • stable/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs

    r13508 r14077  
    8585        foreach (var column in cells) {
    8686          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);
    8989            double randMultiplier = (max - min);
    9090            foreach (int index in column.Value) {
     
    9393            }
    9494          } 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);
    9797            double randMultiplier = (max - min).TotalSeconds;
    9898            foreach (int index in column.Value) {
     
    213213        foreach (var column in cells) {
    214214          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));
    216216          } 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));
    218218          } 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));
    220220          } else {
    221221            throw new ArgumentException("column with index: " + column.Key + " contains a non supported type.");
Note: See TracChangeset for help on using the changeset viewer.