Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/11/17 13:44:01 (8 years ago)
Author:
gkronber
Message:

#2698: merged r14381 r14382 r14384 r14388 r14418 r14425 from trunk to stable

Location:
stable
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.DataPreprocessing/3.4

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

    r14186 r14963  
    2323using System.Collections.Generic;
    2424using System.Drawing;
    25 using System.Linq;
    2625using HeuristicLab.Analysis;
    2726using HeuristicLab.Common;
     
    126125
    127126
    128     public ICheckedItemList<StringValue> CreateVariableItemList(IEnumerable<string> checkedItems = null) {
     127    public ICheckedItemList<StringValue> CreateVariableItemList(IList<string> checkedItems = null) {
     128      if (checkedItems == null) checkedItems = new string[0];
    129129      ICheckedItemList<StringValue> itemList = new CheckedItemList<StringValue>();
    130130      foreach (string name in PreprocessingData.GetDoubleVariableNames()) {
    131131        var n = new StringValue(name);
    132         itemList.Add(n, (checkedItems == null) ? true : checkedItems.Contains(name));
     132        itemList.Add(n, checkedItems.Contains(name));
    133133      }
    134134      return new ReadOnlyCheckedItemList<StringValue>(itemList);
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs

    r14186 r14963  
    4747      get { return ActiveData.VariableNames; }
    4848    }
     49
     50    public IList<string> InputVariables { get { return ActiveData.InputVariables; } }
     51    public string TargetVariable { get { return ActiveData.TargetVariable; } } // optional
    4952
    5053    public IDictionary<int, IList<int>> Selection {
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs

    r14186 r14963  
    6565    bool VariableHasType<T>(int columnIndex);
    6666
     67    IList<string> InputVariables { get; }
     68    string TargetVariable { get; } // optional
     69
    6770    int Columns { get; }
    6871    int Rows { get; }
  • stable/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs

    r14960 r14963  
    5959    }
    6060
     61    public IList<string> InputVariables { get; private set; }
     62    public string TargetVariable { get; private set; } // optional
     63
    6164    public int Columns {
    6265      get { return variableNames.Count; }
     
    8285      TrainingPartition = (IntRange)original.TrainingPartition.Clone(cloner);
    8386      TestPartition = (IntRange)original.TestPartition.Clone(cloner);
    84       transformations = new List<ITransformation>();
     87      transformations = new List<ITransformation>(original.transformations.Select(cloner.Clone));
     88
     89      InputVariables = new List<string>(original.InputVariables);
     90      TargetVariable = original.TargetVariable;
    8591
    8692      RegisterEventHandler();
     
    102108      Dataset dataset = (Dataset)problemData.Dataset;
    103109      variableNames = new List<string>(problemData.Dataset.VariableNames);
     110      InputVariables = new List<string>(problemData.AllowedInputVariables);
     111      TargetVariable = (problemData is IRegressionProblemData) ? ((IRegressionProblemData)problemData).TargetVariable
     112        : (problemData is IClassificationProblemData) ? ((IClassificationProblemData)problemData).TargetVariable
     113        : null;
    104114
    105115      int columnIndex = 0;
Note: See TracChangeset for help on using the changeset viewer.