Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10973


Ignore:
Timestamp:
06/11/14 11:53:29 (10 years ago)
Author:
aesterer
Message:

Handling of string and dates values for histogram classification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ChartLogic.cs

    r10915 r10973  
    8787        int columnIndex           = preprocessingData.GetColumnIndex(variableName);
    8888        bool isDouble             = preprocessingData.IsType<double>(columnIndex);
    89         double distinctValueCount = preprocessingData.GetValues<double>(columnIndex).GroupBy(x => x).Count();
    90         bool distinctValuesOk     = distinctValueCount <= MAX_DISTINCT_VALUES_FOR_CLASSIFCATION;
    91 
    92         if (isDouble && distinctValuesOk)
    93               doubleVariableNames.Add(variableName);
     89        if (isDouble) {
     90          double distinctValueCount = preprocessingData.GetValues<double>(columnIndex).GroupBy(x => x).Count();
     91          bool distinctValuesOk = distinctValueCount <= MAX_DISTINCT_VALUES_FOR_CLASSIFCATION;
     92          if (distinctValuesOk)
     93            doubleVariableNames.Add(variableName);
     94        }
    9495      }
    9596
     
    133134        if(row != null)
    134135          dataRows.Add(row);
    135   }
     136      }
    136137      return dataRows;
    137138    }
     
    163164      ScatterPlot scatterPlot = new ScatterPlot();
    164165     
    165 
    166166      List<double> xValues = GetVariableValues(variableNameX).ToList();
    167167      List<double> yValues = GetVariableValues(variableNameY).ToList();
Note: See TracChangeset for help on using the changeset viewer.