Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10922


Ignore:
Timestamp:
05/30/14 11:51:24 (10 years ago)
Author:
pfleck
Message:
  • changed storage of Transformations from Collection to List.
Location:
branches/DataPreprocessing
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessingView.cs

    r10921 r10922  
    6666          new ScatterPlotContent(chartLogic),
    6767          new CorrelationMatrixContent(problemData),
    68           new DataCompletenessChartContent(dataGridLogic, searchLogic)
    69           //new DataCompletenessChartContent(dataCompletenessLogic),
     68          new DataCompletenessChartContent(dataGridLogic, searchLogic),
    7069         
    7170          new FilterContent(filterLogic),
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/ProblemDataCreator.cs

    r10908 r10922  
    3636
    3737    private IEnumerable<string> InputVariables { get { return context.Data.VariableNames; } }
    38     private IEnumerable<ITransformation> Transformations { get { return context.Data.Transformations; } }
     38    private IList<ITransformation> Transformations { get { return context.Data.Transformations; } }
    3939
    4040    public ProblemDataCreator(IPreprocessingContext context) {
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading/3.4/ProblemData.cs

    r10772 r10922  
    16281628    }
    16291629
    1630     public ProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    1631       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     1630    public ProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IList<ITransformation> transformations = null)
     1631      : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {
    16321632      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
    16331633      Parameters.Add(new ConstrainedValueParameter<StringValue>(PriceChangeVariableParameterName, new ItemSet<StringValue>(variables), variables.First(x => x.Value == targetVariable)));
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r10772 r10922  
    292292    }
    293293
    294     public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    295       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     294    public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IList<ITransformation> transformations = null)
     295      : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {
    296296      var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList();
    297297      var target = validTargetVariableValues.Where(x => x.Value == targetVariable).DefaultIfEmpty(validTargetVariableValues.First()).First();
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs

    r10772 r10922  
    2121
    2222using System.Collections.Generic;
    23 using System.Linq;
    2423using HeuristicLab.Common;
    2524using HeuristicLab.Core;
     
    8887    }
    8988
    90     public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null)
    91       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     89    public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IList<ITransformation> transformations = null)
     90      : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {
    9291    }
    9392  }
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs

    r10814 r10922  
    5353      get { return (IFixedValueParameter<IntRange>)Parameters[TestPartitionParameterName]; }
    5454    }
    55     public IFixedValueParameter<ReadOnlyItemCollection<ITransformation>> TransformationsParameter {
    56       get { return (IFixedValueParameter<ReadOnlyItemCollection<ITransformation>>)Parameters[TransformationsParameterName]; }
     55    public IFixedValueParameter<ReadOnlyItemList<ITransformation>> TransformationsParameter {
     56      get { return (IFixedValueParameter<ReadOnlyItemList<ITransformation>>)Parameters[TransformationsParameterName]; }
    5757    }
    5858    #endregion
     
    120120    private void AfterDeserialization() {
    121121      if (!Parameters.ContainsKey(TransformationsParameterName)) {
    122         Parameters.Add(new FixedValueParameter<ReadOnlyItemCollection<ITransformation>>(TransformationsParameterName, "", new ItemCollection<ITransformation>().AsReadOnly()));
     122        Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", new ItemList<ITransformation>().AsReadOnly()));
    123123        TransformationsParameter.Hidden = true;
    124124      }
     
    126126    }
    127127
    128     protected DataAnalysisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations) {
     128    protected DataAnalysisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IList<ITransformation> transformations) {
    129129      if (dataset == null) throw new ArgumentNullException("The dataset must not be null.");
    130130      if (allowedInputVariables == null) throw new ArgumentNullException("The allowedInputVariables must not be null.");
     
    144144      int testPartitionEnd = dataset.Rows;
    145145
    146       var transformationsCollection = new ItemCollection<ITransformation>(transformations);
     146      var transformationsList = new ItemList<ITransformation>(transformations);
    147147
    148148      Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", dataset));
     
    150150      Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd)));
    151151      Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd)));
    152       Parameters.Add(new FixedValueParameter<ReadOnlyItemCollection<ITransformation>>(TransformationsParameterName, "", transformationsCollection.AsReadOnly()));
     152      Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", transformationsList.AsReadOnly()));
    153153
    154154      TransformationsParameter.Hidden = true;
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r10772 r10922  
    130130    }
    131131
    132     public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    133       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     132    public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IList<ITransformation> transformations = null)
     133      : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {
    134134      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
    135135      Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First()));
Note: See TracChangeset for help on using the changeset viewer.