Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/07/17 16:55:03 (7 years ago)
Author:
mkommend
Message:

#2709: Added grouping for multi scatter plot view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs

    r14581 r14725  
    3535  [View("Preprocessing Chart View")]
    3636  [Content(typeof(PreprocessingChartContent), false)]
    37   public partial class PreprocessingChartView : PreprocessingCheckedVariablesView {
    38     private const int MAX_DISTINCT_VALUES_FOR_GROUPING = 20;
     37  public partial class PreprocessingChartView : PreprocessingCheckedVariablesView { 
    3938    protected Dictionary<string, DataTable> dataTables;
    4039    protected Dictionary<string, DataTableControl> dataTableControls;
     
    6463        GenerateLayout();
    6564      }
    66     }
    67 
    68     protected static IEnumerable<string> GetVariableNamesForGrouping(IPreprocessingData preprocessingData) {
    69       var variableNames = new List<string>();
    70 
    71       for (int i = 0; i < preprocessingData.Columns; ++i) {
    72         int distinctValues = Int32.MaxValue;
    73         if (preprocessingData.VariableHasType<double>(i))
    74           distinctValues = preprocessingData.GetValues<double>(i).GroupBy(x => x).Count();
    75         else if (preprocessingData.VariableHasType<string>(i))
    76           distinctValues = preprocessingData.GetValues<string>(i).GroupBy(x => x).Count();
    77         else if (preprocessingData.VariableHasType<DateTime>(i))
    78           distinctValues = preprocessingData.GetValues<DateTime>(i).GroupBy(x => x).Count();
    79 
    80         if (distinctValues <= MAX_DISTINCT_VALUES_FOR_GROUPING)
    81           variableNames.Add(preprocessingData.GetVariableName(i));
    82       }
    83       return variableNames;
    8465    }
    8566
Note: See TracChangeset for help on using the changeset viewer.