Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/09/14 10:37:01 (10 years ago)
Author:
gkronber
Message:

#2206: made several changes / improvements to the data-preprocessing code while reviewing the code

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs

    r11114 r11156  
    221221    }
    222222
    223     public bool IsType<T>(string variableName) {
     223    public bool VariableHasType<T>(string variableName) {
    224224      return variableValues[variableName] is IList<T>;
    225225    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r11114 r11156  
    159159    <Compile Include="Interfaces\IDataAnalysisSolutionExporter.cs" />
    160160    <Compile Include="Interfaces\IDependencyCalculator.cs" />
    161     <Compile Include="Interfaces\IModelBacktransformator.cs" />
    162161    <Compile Include="Interfaces\ITransformation.cs" />
    163162    <Compile Include="Interfaces\ITransformationMapper.cs" />
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs

    r11114 r11156  
    126126    }
    127127
    128     protected DataAnalysisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations) {
     128    protected DataAnalysisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null) {
    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.");
     
    132132      if (allowedInputVariables.Except(dataset.DoubleVariables).Any())
    133133        throw new ArgumentException("All allowed input variables must be present in the dataset and of type double.");
    134 
    135       if (transformations == null) throw new ArgumentNullException("The transformations must not be null.");
    136134
    137135      var inputVariables = new CheckedItemList<StringValue>(dataset.DoubleVariables.Select(x => new StringValue(x)));
     
    144142      int testPartitionEnd = dataset.Rows;
    145143
    146       var transformationsList = new ItemList<ITransformation>(transformations);
     144      var transformationsList = new ItemList<ITransformation>(transformations ?? Enumerable.Empty<ITransformation>());
    147145
    148146      Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", dataset));
Note: See TracChangeset for help on using the changeset viewer.