Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/13 17:21:25 (11 years ago)
Author:
pfleck
Message:
  • Cloned Algorithm and swapped Dataset an other members of the DataAnalysisProblemData
  • Refactored GetMostOuterContent
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
Files:
2 edited

Legend:

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

    r10219 r10221  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Problems.DataAnalysis;
    2425
    2526namespace HeuristicLab.DataPreprocessing {
    2627  [Item("PreprocessingContext", "PreprocessingContext")]
    2728  public class PreprocessingContext : Item, IPreprocessingContext {
    28     public PreprocessingContext(IPreprocessingData data, IItem parentItem) {
     29    public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData) {
    2930      Data = data;
    3031      ParentItem = parentItem;
     32      DataAnalysisProblemData = dataAnalysisProblemData;
    3133    }
    3234
     
    3537      Data = cloner.Clone(original.Data);
    3638      ParentItem = original.ParentItem;
     39      DataAnalysisProblemData = original.DataAnalysisProblemData;
    3740    }
    3841
     
    4447    public IItem ParentItem { get; private set; }
    4548
     49    public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; }
     50
    4651    public override IDeepCloneable Clone(Cloner cloner) {
    4752      return new PreprocessingContext(this, cloner);
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs

    r10220 r10221  
    142142    }
    143143
     144    public IntRange TrainingPartition {
     145      get { return new IntRange(0, (int)(Rows * trainingToTestRatio)); }
     146    }
     147
     148    public IntRange TestPartition {
     149      get { return new IntRange((int)(Rows * trainingToTestRatio), Math.Max(Rows - 1, 0)); }
     150    }
     151
    144152    public IEnumerable<string> VariableNames {
    145153      get { return variableNames; }
     
    155163
    156164    public int Rows {
    157       get { return variableValues.Count; }
     165      get { return variableValues[variableNames[0]].Count; }
    158166    }
    159167    public IDictionary<string, IEnumerable<int>> GetMissingValueIndices() {
Note: See TracChangeset for help on using the changeset viewer.