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
Files:
3 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     
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/ISearchLogic.cs

    r10661 r10776  
    2626    /// <summary>
    2727    /// Return the indices of the missing values where the key
    28     /// correspdonds to the variable name and the values to the row indices
     28    /// correspdonds to the columbn index and the values to the row indices
    2929    /// </summary>
    3030    /// <returns></returns>
    31     IDictionary<string, IEnumerable<int>> GetMissingValueIndices();
     31    IDictionary<int, IList<int>> GetMissingValueIndices();
    3232
    3333    /// <summary>
     
    3535    /// </summary>
    3636    /// <returns></returns>
    37     IEnumerable<int> GetMissingValueIndices(int columnIndex);
     37    IList<int> GetMissingValueIndices(int columnIndex);
    3838
    3939    bool IsMissingValue(int columnIndex, int rowIndex);
Note: See TracChangeset for help on using the changeset viewer.