Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/14 14:04:01 (11 years ago)
Author:
rstoll
Message:
  • Missing values manipulations
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationContent.cs

    r10709 r10776  
    3030
    3131    private IManipulationLogic manipulationLogic;
     32    private ISearchLogic searchLogic;
    3233
    33     public ManipulationContent(IManipulationLogic theManipulationLogic) {
     34    public ManipulationContent(IManipulationLogic theManipulationLogic, ISearchLogic theSearchLogic) {
    3435      manipulationLogic = theManipulationLogic;
     36      searchLogic = theSearchLogic;
    3537    }
    3638
     
    4749    }
    4850
     51    public ISearchLogic SearchLogic {
     52      get {
     53        return searchLogic;
     54      }
     55    }
    4956
    5057    public static new Image StaticItemImage {
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/SearchLogic.cs

    r10737 r10776  
    2929    private readonly ITransactionalPreprocessingData preprocessingData;
    3030
    31     private Dictionary<int, IEnumerable<int>> MissingValueIndicies { get; set; }
     31    private Dictionary<int, IList<int>> MissingValueIndicies { get; set; }
    3232    private Dictionary<int, IEnumerable> ValuesWithoutNaN { get; set; }
    3333
     
    3535      preprocessingData = thePreprocessingData;
    3636
    37       MissingValueIndicies = new Dictionary<int, IEnumerable<int>>();
     37      MissingValueIndicies = new Dictionary<int, IList<int>>();
    3838      ValuesWithoutNaN = new Dictionary<int, IEnumerable>();
    3939
     
    5757        case DataPreprocessingChangedEventType.Any:
    5858        case DataPreprocessingChangedEventType.Transformation:
    59           MissingValueIndicies = new Dictionary<int, IEnumerable<int>>();
     59          MissingValueIndicies = new Dictionary<int, IList<int>>();
    6060          ValuesWithoutNaN = new Dictionary<int, IEnumerable>();
    6161          break;
     
    6363    }
    6464
    65     public IDictionary<string, IEnumerable<int>> GetMissingValueIndices() {
    66       var dic = new Dictionary<string, IEnumerable<int>>();
    67       foreach (string variableName in preprocessingData.VariableNames) {
    68         dic.Add(variableName, GetMissingValueIndices(preprocessingData.GetColumnIndex(variableName)));
     65    public IDictionary<int, IList<int>> GetMissingValueIndices() {
     66      var dic = new Dictionary<int, IList<int>>();
     67      for (int i = 0; i < preprocessingData.Columns; ++i) {
     68        dic.Add(i, GetMissingValueIndices(i));
    6969      }
    7070      return dic;
     
    8383    }
    8484
    85     public IEnumerable<int> GetMissingValueIndices(int columnIndex) {
     85    public IList<int> GetMissingValueIndices(int columnIndex) {
    8686      if (!MissingValueIndicies.ContainsKey(columnIndex)){       
    8787          if (preprocessingData.IsType<double>(columnIndex)) {
     
    9898      return MissingValueIndicies[columnIndex];
    9999   }
    100     private IEnumerable<int> GetMissingValueIndices<T>(int columnIndex) {
     100    private IList<int> GetMissingValueIndices<T>(int columnIndex) {
    101101      List<int> missingIndices = new List<int>();
    102102     
Note: See TracChangeset for help on using the changeset viewer.