Ignore:
Timestamp:
07/14/17 10:29:51 (3 years ago)
Author:
pfleck
Message:

#2709 merged to stable

Location:
stable
Files:
2 deleted
27 edited
2 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.DataPreprocessing

    • Property svn:mergeinfo set to (toggle deleted branches)
      /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessingmergedeligible
      /branches/crossvalidation-2434/HeuristicLab.DataPreprocessingmergedeligible
      /trunk/sources/HeuristicLab.DataPreprocessingmergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.DataPreprocessing10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.DataPreprocessing5516-5520
      /branches/Benchmarking/sources/HeuristicLab.DataPreprocessing6917-7005
      /branches/CloningRefactoring/HeuristicLab.DataPreprocessing4656-4721
      /branches/CodeEditor/HeuristicLab.DataPreprocessing11700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.DataPreprocessing5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.DataPreprocessing5815-6180
      /branches/DataAnalysis/HeuristicLab.DataPreprocessing4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.DataPreprocessing10085-11101
      /branches/GP.Grammar.Editor/HeuristicLab.DataPreprocessing6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.DataPreprocessing5060
      /branches/HLScript/HeuristicLab.DataPreprocessing10331-10358
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.DataPreprocessing11570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.DataPreprocessing6123-9799
      /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.DataPreprocessing11130-12721
      /branches/HiveStatistics/sources/HeuristicLab.DataPreprocessing12440-12877
      /branches/LogResidualEvaluator/HeuristicLab.DataPreprocessing10202-10483
      /branches/NET40/sources/HeuristicLab.DataPreprocessing5138-5162
      /branches/NSGA-II Changes/HeuristicLab.DataPreprocessing12033-12122
      /branches/ParallelEngine/HeuristicLab.DataPreprocessing5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.DataPreprocessing7568-7810
      /branches/QAPAlgorithms/HeuristicLab.DataPreprocessing6350-6627
      /branches/Restructure trunk solution/HeuristicLab.DataPreprocessing6828
      /branches/RuntimeOptimizer/HeuristicLab.DataPreprocessing8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.DataPreprocessing7787-8333
      /branches/SlaveShutdown/HeuristicLab.DataPreprocessing8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.DataPreprocessing10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.DataPreprocessing5370-5682
      /branches/Trunk/HeuristicLab.DataPreprocessing6829-6865
      /branches/UnloadJobs/HeuristicLab.DataPreprocessing9168-9215
      /branches/VNS/HeuristicLab.DataPreprocessing5594-5752
      /branches/histogram/HeuristicLab.DataPreprocessing5959-6341
      /branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing14232-14825
      /trunk/sources/HeuristicLab.Problems.TestFunctions.MultiObjective/HeuristicLab.DataPreprocessing14175
  • stable/HeuristicLab.DataPreprocessing/3.4

  • stable/HeuristicLab.DataPreprocessing/3.4/Content/CorrelationMatrixContent.cs

    r14186 r15242  
    2727namespace HeuristicLab.DataPreprocessing {
    2828  [Item("Feature Correlation Matrix", "Represents the feature correlation matrix.")]
    29   public class CorrelationMatrixContent : Item, IViewChartShortcut {
     29  public class CorrelationMatrixContent : Item, IViewShortcut {
    3030    public static new Image StaticItemImage {
    3131      get { return HeuristicLab.Common.Resources.VSImageLibrary.Gradient; }
    3232    }
    3333
    34     private PreprocessingContext Context { get; set; }
    35     private ITransactionalPreprocessingData PreprocessingData {
     34    public PreprocessingContext Context { get; private set; }
     35    public ITransactionalPreprocessingData PreprocessingData {
    3636      get { return Context.Data; }
    3737    }
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/DataCompletenessChartContent.cs

    r13508 r15242  
    1 using System.Drawing;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Drawing;
    223using HeuristicLab.Common;
    324using HeuristicLab.Core;
    425
    526namespace HeuristicLab.DataPreprocessing {
    6   [Item("DataCompletenessChart", "Represents a datacompleteness chart.")]
     27  [Item("Data Completeness Chart", "Represents a datacompleteness chart.")]
    728
    8   public class DataCompletenessChartContent : Item, IViewChartShortcut {
     29  public class DataCompletenessChartContent : Item, IViewShortcut {
    930    public static new Image StaticItemImage {
    1031      get { return HeuristicLab.Common.Resources.VSImageLibrary.EditBrightnessContrast; }
    1132    }
    1233
    13     //public DataGridLogic DataGridLogic { get; private set; }
    1434    public SearchLogic SearchLogic { get; private set; }
    1535
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/DataGridContent.cs

    r14186 r15242  
    3030namespace HeuristicLab.DataPreprocessing {
    3131
    32   [Item("DataGrid", "Represents a data grid.")]
     32  [Item("Data Grid", "Represents a data grid.")]
    3333  public class DataGridContent : Item, IStringConvertibleMatrix, IViewShortcut {
    34 
    35     public ITransactionalPreprocessingData PreProcessingData { get; private set; }
    36 
    3734    public static new Image StaticItemImage {
    3835      get { return HeuristicLab.Common.Resources.VSImageLibrary.Table; }
    3936    }
     37
     38    public ITransactionalPreprocessingData PreProcessingData { get; private set; }
    4039
    4140    public ManipulationLogic ManipulationLogic { get; private set; }
     
    4342
    4443    public int Rows {
    45       get {
    46         return PreProcessingData.Rows;
    47       }
    48       set {
    49         //does nothing
    50       }
     44      get { return PreProcessingData.Rows; }
     45      set { }
    5146    }
    5247
    5348    public int Columns {
    54       get {
    55         return PreProcessingData.Columns;
    56       }
    57       set {
    58         //does nothing
    59       }
     49      get { return PreProcessingData.Columns; }
     50      set { }
    6051    }
    6152
    6253    public IEnumerable<string> ColumnNames {
    63       get {
    64         return PreProcessingData.VariableNames;
    65       }
    66       set {
    67 
    68       }
     54      get { return PreProcessingData.VariableNames; }
     55      set { }
    6956    }
    7057
    7158    public IEnumerable<string> RowNames {
    72       get {
    73         return Enumerable.Range(1, Rows).Select(n => n.ToString());
    74       }
    75       set {
    76         throw new NotSupportedException();
    77       }
     59      get { return Enumerable.Range(1, Rows).Select(n => n.ToString()); }
     60      set { throw new NotSupportedException(); }
    7861    }
    7962
    8063    public bool SortableView {
    81       get {
    82         return true;
    83       }
    84       set {
    85         throw new NotSupportedException();
    86       }
     64      get { return true; }
     65      set { throw new NotSupportedException(); }
    8766    }
    8867
     
    9170    }
    9271
    93 
    9472    public IDictionary<int, IList<int>> Selection {
    9573      get { return PreProcessingData.Selection; }
    9674      set { PreProcessingData.Selection = value; }
    9775    }
    98 
    9976
    10077    public DataGridContent(ITransactionalPreprocessingData preProcessingData, ManipulationLogic theManipulationLogic, FilterLogic theFilterLogic) {
     
    137114    }
    138115
    139 
    140116    #region unused stuff/not implemented but necessary due to IStringConvertibleMatrix
    141117#pragma warning disable 0067
     
    154130    public event EventHandler<EventArgs<int, int>> ItemChanged;
    155131    public event EventHandler Reset;
    156 
    157132#pragma warning restore 0067
    158133    #endregion
    159 
    160134  }
    161135}
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/FilterContent.cs

    r14186 r15242  
    2828  [Item("Filter", "Represents the filter grid.")]
    2929  public class FilterContent : Item, IViewShortcut {
    30 
    3130    public static new Image StaticItemImage {
    3231      get { return HeuristicLab.Common.Resources.VSImageLibrary.Filter; }
    3332    }
    3433
    35     private ICheckedItemCollection<IFilter> filters = new CheckedItemCollection<IFilter>();
    36 
    3734    public FilterLogic FilterLogic { get; private set; }
    3835
    39     public ICheckedItemCollection<IFilter> Filters {
    40       get {
    41         return this.filters;
    42       }
    43       set {
    44         this.filters = value;
    45       }
    46     }
     36    public ICheckedItemCollection<IFilter> Filters { get; private set; }
    4737
    48     private bool isAndCombination = true;
    49     public bool IsAndCombination {
    50       get {
    51         return this.isAndCombination;
    52       }
    53       set {
    54         this.isAndCombination = value;
    55       }
    56     }
     38    public bool IsAndCombination { get; set; }
    5739
    5840    public FilterContent(FilterLogic filterLogic) {
     41      Filters = new CheckedItemCollection<IFilter>();
     42      IsAndCombination = true;
    5943      FilterLogic = filterLogic;
    6044    }
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/HistogramContent.cs

    r14186 r15242  
    2020#endregion
    2121
    22 using System.Collections.Generic;
     22using System;
    2323using System.Drawing;
    2424using System.Linq;
     25using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    2930  [Item("Histogram", "Represents the histogram grid.")]
    3031  public class HistogramContent : PreprocessingChartContent {
    31 
    3232    public static new Image StaticItemImage {
    3333      get { return HeuristicLab.Common.Resources.VSImageLibrary.Statistics; }
    3434    }
    35     private const int MAX_DISTINCT_VALUES_FOR_CLASSIFCATION = 20;
    3635
    37     private int classifierVariableIndex = 0;
     36    public string GroupingVariableName { get; set; }
    3837
    39     public int ClassifierVariableIndex {
    40       get { return this.classifierVariableIndex; }
    41       set { this.classifierVariableIndex = value; }
    42     }
    43     public bool IsDetailedChartViewEnabled { get; set; }
     38    public int Bins { get; set; }
     39    public bool ExactBins { get; set; }
    4440
     41    public LegendOrder Order { get; set; }
    4542
    4643    public HistogramContent(IFilteredPreprocessingData preprocessingData)
    4744      : base(preprocessingData) {
    48       AllInOneMode = false;
     45      Bins = 10;
     46      ExactBins = false;
    4947    }
    5048
     
    5654    }
    5755
    58     public IEnumerable<string> GetVariableNamesForHistogramClassification() {
    59       List<string> doubleVariableNames = new List<string>();
     56    public static DataTable CreateHistogram(IFilteredPreprocessingData preprocessingData, string variableName, string groupingVariableName, DataTableVisualProperties.DataTableHistogramAggregation aggregation, LegendOrder legendOrder = LegendOrder.Alphabetically) {
     57      var dataTable = new DataTable {
     58        VisualProperties = { Title = variableName, HistogramAggregation = aggregation },
     59      };
    6060
    61       //only return variable names from type double
    62       for (int i = 0; i < PreprocessingData.Columns; ++i) {
    63         if (PreprocessingData.VariableHasType<double>(i)) {
    64           double distinctValueCount = PreprocessingData.GetValues<double>(i).GroupBy(x => x).Count();
    65           bool distinctValuesOk = distinctValueCount <= MAX_DISTINCT_VALUES_FOR_CLASSIFCATION;
    66           if (distinctValuesOk)
    67             doubleVariableNames.Add(PreprocessingData.GetVariableName(i));
    68         }
     61      if (string.IsNullOrEmpty(groupingVariableName)) {
     62        var row = PreprocessingChartContent.CreateDataRow(preprocessingData, variableName, DataRowVisualProperties.DataRowChartType.Histogram);
     63        row.VisualProperties.IsVisibleInLegend = false;
     64        dataTable.Rows.Add(row);
     65        return dataTable;
    6966      }
    70       return doubleVariableNames;
     67
     68      int variableIndex = preprocessingData.GetColumnIndex(variableName);
     69      var variableValues = preprocessingData.GetValues<double>(variableIndex);
     70      int groupVariableIndex = preprocessingData.GetColumnIndex(groupingVariableName);
     71      var groupingValues = Enumerable.Empty<string>();
     72
     73      if (preprocessingData.VariableHasType<double>(groupVariableIndex)) {
     74        groupingValues = preprocessingData.GetValues<double>(groupVariableIndex).Select(x => x.ToString());
     75      } else if (preprocessingData.VariableHasType<string>(groupVariableIndex)) {
     76        groupingValues = preprocessingData.GetValues<string>(groupVariableIndex);
     77      } else if (preprocessingData.VariableHasType<DateTime>(groupVariableIndex)) {
     78        groupingValues = preprocessingData.GetValues<DateTime>(groupVariableIndex).Select(x => x.ToString());
     79      }
     80
     81      var groups = groupingValues.Zip(variableValues, Tuple.Create).GroupBy(t => t.Item1, t => t.Item2);
     82
     83      if (legendOrder == LegendOrder.Alphabetically)
     84        groups = groups.OrderBy(x => x.Key, new NaturalStringComparer());
     85
     86      foreach (var group in groups) {
     87        var classRow = new DataRow {
     88          Name = group.Key,
     89          VisualProperties = {
     90              ChartType = DataRowVisualProperties.DataRowChartType.Histogram,
     91              IsVisibleInLegend = !string.IsNullOrEmpty(groupingVariableName)
     92            }
     93        };
     94        classRow.Values.AddRange(group);
     95        dataTable.Rows.Add(classRow);
     96      }
     97      return dataTable;
    7198    }
    72 
    7399  }
    74100}
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/LineChartContent.cs

    r14186 r15242  
    2626namespace HeuristicLab.DataPreprocessing {
    2727
    28   [Item("LineChart", "Represents the line chart grid.")]
     28  [Item("Line Chart", "Represents the line chart grid.")]
    2929  public class LineChartContent : PreprocessingChartContent {
     30    public bool AllInOneMode { get; set; }
    3031
    3132    public static new Image StaticItemImage {
     
    3536    public LineChartContent(IFilteredPreprocessingData preprocessingData)
    3637      : base(preprocessingData) {
     38      AllInOneMode = true;
    3739    }
    3840
    3941    public LineChartContent(LineChartContent content, Cloner cloner)
    4042      : base(content, cloner) {
     43      this.AllInOneMode = content.AllInOneMode;
    4144    }
    4245    public override IDeepCloneable Clone(Cloner cloner) {
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/ManipulationContent.cs

    r14186 r15242  
    2828  [Item("Manipulation", "Represents the available manipulations on a data set.")]
    2929  public class ManipulationContent : Item, IViewShortcut {
    30 
    31     private ManipulationLogic manipulationLogic;
    32     private SearchLogic searchLogic;
    33     private FilterLogic filterLogic;
    34 
    35     public ManipulationLogic ManipulationLogic { get { return manipulationLogic; } }
    36     public SearchLogic SearchLogic { get { return searchLogic; } }
    37     public FilterLogic FilterLogic { get { return filterLogic; } }
    38 
    3930    public static new Image StaticItemImage {
    4031      get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
    4132    }
    4233
    43     public ManipulationContent(ManipulationLogic theManipulationLogic, SearchLogic theSearchLogic, FilterLogic theFilterLogic) {
    44       manipulationLogic = theManipulationLogic;
    45       searchLogic = theSearchLogic;
    46       filterLogic = theFilterLogic;
     34    public ManipulationLogic ManipulationLogic { get; private set; }
     35    public SearchLogic SearchLogic { get; private set; }
     36    public FilterLogic FilterLogic { get; private set; }
     37
     38    public ManipulationContent(ManipulationLogic manipulationLogic, SearchLogic searchLogic, FilterLogic filterLogic) {
     39      ManipulationLogic = manipulationLogic;
     40      SearchLogic = searchLogic;
     41      FilterLogic = filterLogic;
    4742    }
    4843
     
    5247      return new ManipulationContent(this, cloner);
    5348    }
    54 
    55 
    5649  }
    5750}
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs

    r14963 r15242  
    2323using System.Collections.Generic;
    2424using System.Drawing;
     25using System.Linq;
    2526using HeuristicLab.Analysis;
    2627using HeuristicLab.Common;
     28using HeuristicLab.Common.Resources;
    2729using HeuristicLab.Core;
    2830using HeuristicLab.Data;
     
    3032namespace HeuristicLab.DataPreprocessing {
    3133  [Item("PreprocessingChart", "Represents a preprocessing chart.")]
    32   public class PreprocessingChartContent : Item, IViewChartShortcut {
    33     public static new Image StaticItemImage {
    34       get { return HeuristicLab.Common.Resources.VSImageLibrary.PieChart; }
     34  public class PreprocessingChartContent : Item, IViewShortcut {
     35    public enum LegendOrder {
     36      Alphabetically,
     37      Appearance
    3538    }
    3639
    37     private bool allInOneMode = true;
    38     public bool AllInOneMode {
    39       get { return this.allInOneMode; }
    40       set { this.allInOneMode = value; }
     40    public static new Image StaticItemImage {
     41      get { return VSImageLibrary.PieChart; }
    4142    }
    4243
    4344    private ICheckedItemList<StringValue> variableItemList = null;
    4445    public ICheckedItemList<StringValue> VariableItemList {
    45       get { return this.variableItemList; }
    46       set { this.variableItemList = value; }
     46      get {
     47        if (variableItemList == null)
     48          variableItemList = CreateVariableItemList(PreprocessingData);
     49        return this.variableItemList;
     50      }
    4751    }
    4852
    4953    public IFilteredPreprocessingData PreprocessingData { get; private set; }
     54    public event DataPreprocessingChangedEventHandler Changed {
     55      add { PreprocessingData.Changed += value; }
     56      remove { PreprocessingData.Changed -= value; }
     57    }
    5058
    5159    public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) {
     
    5563    public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner)
    5664      : base(content, cloner) {
    57       this.allInOneMode = content.allInOneMode;
    5865      this.PreprocessingData = content.PreprocessingData;
    5966      this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList);
     
    6370    }
    6471
     72    public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
     73      return CreateDataRow(PreprocessingData, variableName, chartType);
     74    }
    6575
    66     public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
    67       IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName));
     76    public static DataRow CreateDataRow(IFilteredPreprocessingData preprocessingData, string variableName, DataRowVisualProperties.DataRowChartType chartType) {
     77      IList<double> values = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName));
    6878      DataRow row = new DataRow(variableName, "", values);
    6979      row.VisualProperties.ChartType = chartType;
     
    7181    }
    7282
    73     public List<DataRow> CreateAllDataRows(DataRowVisualProperties.DataRowChartType chartType) {
    74       List<DataRow> dataRows = new List<DataRow>();
    75       foreach (var name in PreprocessingData.GetDoubleVariableNames())
    76         dataRows.Add(CreateDataRow(name, chartType));
    77       return dataRows;
    78     }
    79 
    80     public DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
    81 
    82       IDictionary<int, IList<int>> selection = PreprocessingData.Selection;
    83       int variableIndex = PreprocessingData.GetColumnIndex(variableName);
    84 
    85       if (selection.Keys.Contains(variableIndex)) {
    86         List<int> selectedIndices = new List<int>(selection[variableIndex]);
    87         //need selection with more than 1 value
    88         if (selectedIndices.Count < 2)
    89           return null;
    90 
    91         selectedIndices.Sort();
    92         int start = selectedIndices[0];
    93         int end = selectedIndices[selectedIndices.Count - 1];
    94 
    95         DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType);
    96         return rowSelect;
    97       } else
    98         return null;
    99     }
    100 
    101     public DataRow CreateDataRowRange(string variableName, int start, int end, DataRowVisualProperties.DataRowChartType chartType) {
    102       IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName));
    103       IList<double> valuesRange = new List<double>();
    104       for (int i = 0; i < values.Count; i++) {
    105         if (i >= start && i <= end)
    106           valuesRange.Add(values[i]);
    107         else
    108           valuesRange.Add(Double.NaN);
    109       }
    110 
    111       DataRow row = new DataRow(variableName, "", valuesRange);
    112       row.VisualProperties.ChartType = chartType;
    113       return row;
    114     }
    115 
    116     public List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType) {
    117       List<DataRow> dataRows = new List<DataRow>();
    118       foreach (var name in PreprocessingData.GetDoubleVariableNames()) {
    119         DataRow row = CreateSelectedDataRow(name, chartType);
    120         if (row != null)
    121           dataRows.Add(row);
    122       }
    123       return dataRows;
    124     }
    125 
    126 
    127     public ICheckedItemList<StringValue> CreateVariableItemList(IList<string> checkedItems = null) {
    128       if (checkedItems == null) checkedItems = new string[0];
     83    private static ICheckedItemList<StringValue> CreateVariableItemList(IPreprocessingData preprocessingData) {
    12984      ICheckedItemList<StringValue> itemList = new CheckedItemList<StringValue>();
    130       foreach (string name in PreprocessingData.GetDoubleVariableNames()) {
     85      foreach (string name in preprocessingData.GetDoubleVariableNames()) {
    13186        var n = new StringValue(name);
    132         itemList.Add(n, checkedItems.Contains(name));
     87        bool isInputTarget = preprocessingData.InputVariables.Contains(name) || preprocessingData.TargetVariable == name;
     88        itemList.Add(n, isInputTarget);
    13389      }
    13490      return new ReadOnlyCheckedItemList<StringValue>(itemList);
    13591    }
    13692
    137     public event DataPreprocessingChangedEventHandler Changed {
    138       add { PreprocessingData.Changed += value; }
    139       remove { PreprocessingData.Changed -= value; }
     93    public static IEnumerable<string> GetVariableNamesForGrouping(IPreprocessingData preprocessingData, int maxDistinctValues = 20) {
     94      var variableNames = new List<string>();
     95
     96      for (int i = 0; i < preprocessingData.Columns; ++i) {
     97        int distinctValues = Int32.MaxValue;
     98        if (preprocessingData.VariableHasType<double>(i))
     99          distinctValues = preprocessingData.GetValues<double>(i).GroupBy(x => x).Count();
     100        else if (preprocessingData.VariableHasType<string>(i))
     101          distinctValues = preprocessingData.GetValues<string>(i).GroupBy(x => x).Count();
     102        else if (preprocessingData.VariableHasType<DateTime>(i))
     103          distinctValues = preprocessingData.GetValues<DateTime>(i).GroupBy(x => x).Count();
     104
     105        if (distinctValues <= maxDistinctValues)
     106          variableNames.Add(preprocessingData.GetVariableName(i));
     107      }
     108      return variableNames;
    140109    }
    141 
    142110  }
    143111}
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs

    r14186 r15242  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    23 using System.Drawing;
    2424using System.Linq;
    2525using HeuristicLab.Analysis;
    2626using HeuristicLab.Common;
    27 using HeuristicLab.Core;
     27using HeuristicLab.Visualization.ChartControlsExtensions;
    2828
    2929namespace HeuristicLab.DataPreprocessing {
    3030
    31   [Item("ScatterPlot", "Represents a scatter plot.")]
    32   public class ScatterPlotContent : PreprocessingChartContent {
     31  public abstract class ScatterPlotContent : PreprocessingChartContent {
     32    public string GroupingVariable { get; set; }
    3333
    34     public string SelectedXVariable { get; set; }
    35     public string SelectedYVariable { get; set; }
    36     public string SelectedColorVariable { get; set; }
    37 
    38     public ScatterPlotContent(IFilteredPreprocessingData preprocessingData)
     34    protected ScatterPlotContent(IFilteredPreprocessingData preprocessingData)
    3935      : base(preprocessingData) {
    4036    }
    4137
    42     public ScatterPlotContent(ScatterPlotContent content, Cloner cloner)
     38    protected ScatterPlotContent(ScatterPlotContent content, Cloner cloner)
    4339      : base(content, cloner) {
    44       this.SelectedXVariable = content.SelectedXVariable;
    45       this.SelectedYVariable = content.SelectedYVariable;
    46       this.SelectedColorVariable = content.SelectedColorVariable;
    4740    }
    4841
    49     public static new Image StaticItemImage {
    50       get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
    51     }
    52 
    53     public override IDeepCloneable Clone(Cloner cloner) {
    54       return new ScatterPlotContent(this, cloner);
    55     }
    56 
    57     public ScatterPlot CreateScatterPlot(string variableNameX, string variableNameY, string variableNameColor = "-") {
     42    public static ScatterPlot CreateScatterPlot(IFilteredPreprocessingData preprocessingData, string variableNameX, string variableNameY, string variableNameGroup = "-", LegendOrder legendOrder = LegendOrder.Alphabetically) {
    5843      ScatterPlot scatterPlot = new ScatterPlot();
    5944
    60       IList<double> xValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameX));
    61       IList<double> yValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameY));
    62       if (variableNameColor == null || variableNameColor == "-") {
    63         List<Point2D<double>> points = new List<Point2D<double>>();
     45      IList<double> xValues = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableNameX));
     46      IList<double> yValues = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableNameY));
    6447
    65         for (int i = 0; i < xValues.Count; i++) {
    66           Point2D<double> point = new Point2D<double>(xValues[i], yValues[i]);
    67           points.Add(point);
    68         }
     48      var points = xValues.Zip(yValues, (x, y) => new Point2D<double>(x, y)).ToList();
     49      var validPoints = points.Where(p => !double.IsNaN(p.X) && !double.IsNaN(p.Y) && !double.IsInfinity(p.X) && !double.IsInfinity(p.Y)).ToList();
     50      if (validPoints.Any()) {
     51        try {
     52          double axisMin, axisMax, axisInterval;
     53          ChartUtil.CalculateOptimalAxisInterval(validPoints.Min(p => p.X), validPoints.Max(p => p.X), out axisMin, out axisMax, out axisInterval);
     54          scatterPlot.VisualProperties.XAxisMinimumAuto = false;
     55          scatterPlot.VisualProperties.XAxisMaximumAuto = false;
     56          scatterPlot.VisualProperties.XAxisMinimumFixedValue = axisMin;
     57          scatterPlot.VisualProperties.XAxisMaximumFixedValue = axisMax;
     58        } catch (ArgumentOutOfRangeException) { } // error during CalculateOptimalAxisInterval
     59        try {
     60          double axisMin, axisMax, axisInterval;
     61          ChartUtil.CalculateOptimalAxisInterval(validPoints.Min(p => p.Y), validPoints.Max(p => p.Y), out axisMin, out axisMax, out axisInterval);
     62          scatterPlot.VisualProperties.YAxisMinimumAuto = false;
     63          scatterPlot.VisualProperties.YAxisMaximumAuto = false;
     64          scatterPlot.VisualProperties.YAxisMinimumFixedValue = axisMin;
     65          scatterPlot.VisualProperties.YAxisMaximumFixedValue = axisMax;
     66        } catch (ArgumentOutOfRangeException) { } // error during CalculateOptimalAxisInterval
     67      }
    6968
    70         ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", points);
     69
     70      //No Grouping
     71      if (string.IsNullOrEmpty(variableNameGroup) || variableNameGroup == "-") {
     72        ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", validPoints);
     73        scdr.VisualProperties.IsVisibleInLegend = false;
    7174        scatterPlot.Rows.Add(scdr);
     75        return scatterPlot;
     76      }
    7277
    73       } else {
    74         var colorValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameColor));
    75         var data = xValues.Zip(yValues, (x, y) => new { x, y }).Zip(colorValues, (v, c) => new { v.x, v.y, c }).ToList();
    76         var gradients = ColorGradient.Colors;
    77         int curGradient = 0;
    78         int numColors = colorValues.Distinct().Count();
    79         foreach (var colorValue in colorValues.Distinct()) {
    80           var values = data.Where(x => x.c == colorValue);
    81           var row = new ScatterPlotDataRow(
    82             variableNameX + " - " + variableNameY + " (" + colorValue + ")",
    83             "",
    84             values.Select(v => new Point2D<double>(v.x, v.y)),
    85             new ScatterPlotDataRowVisualProperties() { Color = gradients[curGradient] });
    86           curGradient += gradients.Count / numColors;
    87           scatterPlot.Rows.Add(row);
    88         }
     78      //Grouping
     79      int groupVariableIndex = preprocessingData.GetColumnIndex(variableNameGroup);
     80      var groupingValues = Enumerable.Empty<string>();
     81
     82      if (preprocessingData.VariableHasType<double>(groupVariableIndex)) {
     83        groupingValues = preprocessingData.GetValues<double>(groupVariableIndex).Select(x => x.ToString());
     84      } else if (preprocessingData.VariableHasType<string>(groupVariableIndex)) {
     85        groupingValues = preprocessingData.GetValues<string>(groupVariableIndex);
     86      } else if (preprocessingData.VariableHasType<DateTime>(groupVariableIndex)) {
     87        groupingValues = preprocessingData.GetValues<DateTime>(groupVariableIndex).Select(x => x.ToString());
     88      }
     89      var groups = groupingValues.Zip(validPoints, Tuple.Create).GroupBy(t => t.Item1, t => t.Item2);
     90
     91      if (legendOrder == LegendOrder.Alphabetically)
     92        groups = groups.OrderBy(x => x.Key, new NaturalStringComparer());
     93
     94      foreach (var group in groups) {
     95        var scdr = new ScatterPlotDataRow {
     96          Name = group.Key,
     97          VisualProperties = {
     98            IsVisibleInLegend = true,
     99            PointSize = 6
     100          }
     101        };
     102        scdr.Points.AddRange(group);
     103        scatterPlot.Rows.Add(scdr);
    89104      }
    90105      return scatterPlot;
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/StatisticsContent.cs

    r14186 r15242  
    2727  [Item("Statistics", "Represents the statistics grid.")]
    2828  public class StatisticsContent : Item, IViewShortcut {
     29    public static new Image StaticItemImage {
     30      get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
     31    }
    2932
    30     private readonly StatisticsLogic statisticsLogic;
    31     public StatisticsContent(StatisticsLogic theStatisticsLogic) {
    32       statisticsLogic = theStatisticsLogic;
     33    public ITransactionalPreprocessingData PreprocessingData { get; private set; }
     34    public StatisticsLogic StatisticsLogic { get; private set; }
     35
     36    public StatisticsContent(ITransactionalPreprocessingData preProcessingData, StatisticsLogic statisticsLogic) {
     37      PreprocessingData = preProcessingData;
     38      StatisticsLogic = statisticsLogic;
    3339    }
    3440
    3541    public StatisticsContent(StatisticsContent content, Cloner cloner)
    3642      : base(content, cloner) {
    37 
    38     }
    39 
    40     public StatisticsLogic StatisticsLogic {
    41       get { return statisticsLogic; }
    42     }
    43 
    44     public static new Image StaticItemImage {
    45       get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
    4643    }
    4744
     
    5148
    5249    public event DataPreprocessingChangedEventHandler Changed {
    53       add { statisticsLogic.Changed += value; }
    54       remove { statisticsLogic.Changed -= value; }
     50      add { StatisticsLogic.Changed += value; }
     51      remove { StatisticsLogic.Changed -= value; }
    5552    }
    56 
    5753  }
    5854}
  • stable/HeuristicLab.DataPreprocessing/3.4/Content/TransformationContent.cs

    r14186 r15242  
    2828  [Item("Transformation", "Represents the transformation grid.")]
    2929  public class TransformationContent : Item, IViewShortcut {
     30    public static new Image StaticItemImage {
     31      get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
     32    }
    3033
    3134    public IPreprocessingData Data { get; private set; }
     
    3336
    3437    public ICheckedItemList<ITransformation> CheckedTransformationList { get; private set; }
    35 
    36     public static new Image StaticItemImage {
    37       get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
    38     }
    3938
    4039    public TransformationContent(IPreprocessingData data, FilterLogic filterLogic) {
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs

    r14963 r15242  
    271271
    272272    #region IPreprocessingData Members
    273 
    274273    public bool Validate(string value, out string errorMessage, int columnIndex) {
    275274      return originalData.Validate(value, out errorMessage, columnIndex);
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs

    r14963 r15242  
    2727
    2828namespace HeuristicLab.DataPreprocessing {
    29 
    3029  public interface IPreprocessingData : INamedItem {
    3130    T GetCell<T>(int columnIndex, int rowIndex);
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/ITransactionalPreprocessingData.cs

    r14186 r15242  
    2424namespace HeuristicLab.DataPreprocessing {
    2525  public interface ITransactionalPreprocessingData : IPreprocessingData {
    26 
    2726    event DataPreprocessingChangedEventHandler Changed;
    2827
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs

    r14963 r15242  
    3333  [Item("PreprocessingData", "Represents data used for preprocessing.")]
    3434  public abstract class PreprocessingData : NamedItem, IPreprocessingData {
    35 
    3635    public IntRange TrainingPartition { get; set; }
    3736    public IntRange TestPartition { get; set; }
    3837
    39     protected IList<ITransformation> transformations;
    40     public IList<ITransformation> Transformations {
    41       get { return transformations; }
    42     }
     38    public IList<ITransformation> Transformations { get; protected set; }
    4339
    4440    protected IList<IList> variableValues;
     
    8581      TrainingPartition = (IntRange)original.TrainingPartition.Clone(cloner);
    8682      TestPartition = (IntRange)original.TestPartition.Clone(cloner);
    87       transformations = new List<ITransformation>(original.transformations.Select(cloner.Clone));
     83      Transformations = new List<ITransformation>(original.Transformations.Select(cloner.Clone));
    8884
    8985      InputVariables = new List<string>(original.InputVariables);
     
    9793      Name = "Preprocessing Data";
    9894
    99       transformations = new List<ITransformation>();
     95      Transformations = new List<ITransformation>();
    10096      selection = new Dictionary<int, IList<int>>();
    10197
     
    166162
    167163    #region IPreprocessingData Members
    168 
    169164    public abstract T GetCell<T>(int columnIndex, int rowIndex);
    170165
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/TransactionalPreprocessingData.cs

    r14186 r15242  
    3333  [Item("PreprocessingData", "Represents data used for preprocessing.")]
    3434  public class TransactionalPreprocessingData : PreprocessingData, ITransactionalPreprocessingData {
    35 
    3635    private class Snapshot {
    3736      public IList<IList> VariableValues { get; set; }
     
    7069        TrainingPartition = new IntRange(TrainingPartition.Start, TrainingPartition.End),
    7170        TestPartition = new IntRange(TestPartition.Start, TestPartition.End),
    72         Transformations = new List<ITransformation>(transformations),
     71        Transformations = new List<ITransformation>(Transformations),
    7372        ChangedType = changedType,
    7473        ChangedColumn = column,
     
    8382
    8483    #region NamedItem abstract Member Implementations
    85 
    8684    public override IDeepCloneable Clone(Cloner cloner) {
    8785      return new TransactionalPreprocessingData(this, cloner);
    8886    }
    89 
    9087    #endregion
    9188
    9289    #region Overridden IPreprocessingData Members
    93 
    9490    public override T GetCell<T>(int columnIndex, int rowIndex) {
    9591      return (T)variableValues[columnIndex][rowIndex];
     
    216212    }
    217213
    218 
    219214    public override void InsertRow(int rowIndex) {
    220215      SaveSnapshot(DataPreprocessingChangedEventType.DeleteRow, -1, rowIndex);
     
    346341
    347342    #region TransactionalPreprocessingData members
    348 
    349343    public bool IsUndoAvailable {
    350344      get { return undoHistory.Count > 0; }
     
    358352        TrainingPartition = previousSnapshot.TrainingPartition;
    359353        TestPartition = previousSnapshot.TestPartition;
    360         transformations = previousSnapshot.Transformations;
     354        Transformations = previousSnapshot.Transformations;
    361355        undoHistory.Remove(previousSnapshot);
    362356        OnChanged(previousSnapshot.ChangedType,
     
    384378      OnChanged(@event, -1, -1);
    385379    }
    386 
    387380    #endregion
    388381  }
  • stable/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj

    r14960 r15242  
    1818    <DebugType>full</DebugType>
    1919    <Optimize>false</Optimize>
    20     <OutputPath>..\..\bin\</OutputPath>
     20    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    2121    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2222    <ErrorReport>prompt</ErrorReport>
     
    2828    <DebugType>pdbonly</DebugType>
    2929    <Optimize>true</Optimize>
    30     <OutputPath>..\..\bin\</OutputPath>
     30    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    3131    <DefineConstants>TRACE</DefineConstants>
    3232    <ErrorReport>prompt</ErrorReport>
     
    3636  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    3737    <PlatformTarget>x64</PlatformTarget>
    38     <OutputPath>..\..\bin\</OutputPath>
     38    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    3939    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4040    <Prefer32Bit>false</Prefer32Bit>
     
    4242  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    4343    <PlatformTarget>x64</PlatformTarget>
    44     <OutputPath>..\..\bin\</OutputPath>
     44    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    4545    <Optimize>true</Optimize>
    4646    <Prefer32Bit>false</Prefer32Bit>
     
    4848  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    4949    <DebugSymbols>true</DebugSymbols>
    50     <OutputPath>..\..\bin\</OutputPath>
     50    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    5151    <DefineConstants>DEBUG;TRACE</DefineConstants>
    5252    <DebugType>full</DebugType>
     
    5757  </PropertyGroup>
    5858  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    59     <OutputPath>..\..\bin\</OutputPath>
     59    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    6060    <DefineConstants>TRACE</DefineConstants>
    6161    <Optimize>true</Optimize>
     
    7878  </ItemGroup>
    7979  <ItemGroup>
     80    <Compile Include="Content\MultiScatterPlotContent.cs" />
     81    <Compile Include="Content\SingleScatterPlotContent.cs" />
    8082    <Compile Include="Content\ScatterPlotContent.cs" />
    8183    <Compile Include="Content\DataCompletenessChartContent.cs" />
     
    8486    <Compile Include="Content\PreprocessingChartContent.cs" />
    8587    <Compile Include="Data\PreprocessingData.cs" />
    86     <Compile Include="Content\PreprocessingDataTable.cs" />
    87     <Compile Include="Content\IViewChartShortcut.cs" />
    8888    <Compile Include="Data\IFilteredPreprocessingData.cs" />
    8989    <Compile Include="Content\CorrelationMatrixContent.cs" />
     
    118118  <ItemGroup>
    119119    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    120       <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project>
     120      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    121121      <Name>HeuristicLab.Analysis-3.3</Name>
    122122      <Private>False</Private>
    123123    </ProjectReference>
    124124    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    125       <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
     125      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    126126      <Name>HeuristicLab.Collections-3.3</Name>
    127127      <Private>False</Private>
    128128    </ProjectReference>
    129129    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
    130       <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
     130      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
    131131      <Name>HeuristicLab.Common.Resources-3.3</Name>
    132132      <Private>False</Private>
    133133    </ProjectReference>
    134134    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    135       <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
     135      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    136136      <Name>HeuristicLab.Common-3.3</Name>
    137137      <Private>False</Private>
    138138    </ProjectReference>
    139139    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    140       <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
     140      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    141141      <Name>HeuristicLab.Core-3.3</Name>
    142142      <Private>False</Private>
    143143    </ProjectReference>
    144144    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    145       <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
     145      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    146146      <Name>HeuristicLab.Data-3.3</Name>
    147147      <Private>False</Private>
    148148    </ProjectReference>
    149149    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    150       <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
     150      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    151151      <Name>HeuristicLab.Optimization-3.3</Name>
    152152      <Private>False</Private>
     
    158158    </ProjectReference>
    159159    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    160       <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
     160      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    161161      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    162162      <Private>False</Private>
    163163    </ProjectReference>
    164164    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    165       <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
     165      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
    166166      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
    167167      <Private>False</Private>
     
    170170      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
    171171      <Name>HeuristicLab.Random-3.3</Name>
     172      <Private>False</Private>
     173    </ProjectReference>
     174    <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj">
     175      <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project>
     176      <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name>
    172177      <Private>False</Private>
    173178    </ProjectReference>
  • stable/HeuristicLab.DataPreprocessing/3.4/Logic/Filter/ComparisonFilter.cs

    r14186 r15242  
    3030  [Item("ComparisonFilter", "A filter which compares the member of the preprocessing data with the constraint data.")]
    3131  public class ComparisonFilter : ComparisonConstraint, IFilter {
    32 
    3332    public override string ItemName {
    3433      get { return "ComparisonFilter"; }
  • stable/HeuristicLab.DataPreprocessing/3.4/Logic/FilterLogic.cs

    r14186 r15242  
    2727namespace HeuristicLab.DataPreprocessing {
    2828  public class FilterLogic {
    29 
    3029    public IFilteredPreprocessingData PreprocessingData { get; private set; }
    3130
    3231    public bool IsFiltered {
    33       get {
    34         return PreprocessingData.IsFiltered;
    35       }
     32      get { return PreprocessingData.IsFiltered; }
    3633    }
    3734
  • stable/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs

    r14960 r15242  
    4040    }
    4141
    42     public ManipulationLogic(ITransactionalPreprocessingData _prepocessingData, SearchLogic theSearchLogic, StatisticsLogic theStatisticsLogic) {
    43       preprocessingData = _prepocessingData;
     42    public ManipulationLogic(ITransactionalPreprocessingData preprocessingData, SearchLogic theSearchLogic, StatisticsLogic theStatisticsLogic) {
     43      this.preprocessingData = preprocessingData;
    4444      searchLogic = theSearchLogic;
    4545      statisticsLogic = theStatisticsLogic;
     
    109109      preprocessingData.InTransaction(() => {
    110110        foreach (var column in cells) {
    111           int countValues = 0;
    112           if (preprocessingData.VariableHasType<double>(column.Key)) {
    113             countValues = preprocessingData.GetValues<double>(column.Key).Count();
    114           } else if (preprocessingData.VariableHasType<DateTime>(column.Key)) {
    115             countValues = preprocessingData.GetValues<DateTime>(column.Key).Count();
    116           }
    117 
    118111          IList<Tuple<int, int>> startEndings = GetStartAndEndingsForInterpolation(column);
    119112          foreach (var tuple in startEndings) {
     
    291284
    292285    public List<int> RowsWithMissingValuesGreater(double percent) {
    293 
    294286      List<int> rows = new List<int>();
    295287
     
    305297
    306298    public List<int> ColumnsWithMissingValuesGreater(double percent) {
    307 
    308299      List<int> columns = new List<int>();
    309300      for (int i = 0; i < preprocessingData.Columns; ++i) {
     
    318309
    319310    public List<int> ColumnsWithVarianceSmaller(double variance) {
    320 
    321311      List<int> columns = new List<int>();
    322312      for (int i = 0; i < preprocessingData.Columns; ++i) {
     
    362352      });
    363353    }
    364 
    365354  }
    366355}
  • stable/HeuristicLab.DataPreprocessing/3.4/Logic/StatisticsLogic.cs

    r14186 r15242  
    2727namespace HeuristicLab.DataPreprocessing {
    2828  public class StatisticsLogic {
    29 
    3029    private readonly ITransactionalPreprocessingData preprocessingData;
    3130    private readonly SearchLogic searchLogic;
  • stable/HeuristicLab.DataPreprocessing/3.4/Plugin.cs.frame

    r14960 r15242  
    3434  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3535  [PluginDependency("HeuristicLab.Data","3.3")]
    36   [PluginDependency("HeuristicLab.Optimization", "3.3")] 
     36  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    3737  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    3838  [PluginDependency("HeuristicLab.Problems.DataAnalysis","3.4")]
    3939  [PluginDependency("HeuristicLab.Random", "3.3")]
     40  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")]
    4041  public class HeuristicLabDataPreprocessingPlugin : PluginBase {
    4142  }
  • stable/HeuristicLab.DataPreprocessing/3.4/PreprocessingContext.cs

    r14572 r15242  
    3232  [StorableClass]
    3333  public class PreprocessingContext : NamedItem, IStorableContent {
    34 
    3534    public string Filename { get; set; }
    3635
  • stable/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs

    r14186 r15242  
    2828namespace HeuristicLab.DataPreprocessing {
    2929  public class ProblemDataCreator {
    30 
    3130    private readonly PreprocessingContext context;
    3231
    3332    private Dataset ExportedDataset {
    34       get {
    35         return context.Data.ExportToDataset();
    36       }
     33      get { return context.Data.ExportToDataset(); }
    3734    }
    3835
    39     private IList<ITransformation> Transformations { get { return context.Data.Transformations; } }
     36    private IList<ITransformation> Transformations {
     37      get { return context.Data.Transformations; }
     38    }
    4039
    4140    public ProblemDataCreator(PreprocessingContext context) {
Note: See TracChangeset for help on using the changeset viewer.