- Timestamp:
- 07/01/14 17:42:44 (10 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r11068 r11070 300 300 } 301 301 302 public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, I List<ITransformation> transformations = null)303 : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {302 public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 303 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 304 304 var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList(); 305 305 var target = validTargetVariableValues.Where(x => x.Value == targetVariable).DefaultIfEmpty(validTargetVariableValues.First()).First(); -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
r11068 r11070 21 21 22 22 using System.Collections.Generic; 23 using System.Linq; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; … … 86 87 } 87 88 88 public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, I List<ITransformation> transformations = null)89 : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {89 public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null) 90 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 90 91 } 91 92 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r11068 r11070 137 137 } 138 138 139 public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, I List<ITransformation> transformations = null)140 : base(dataset, allowedInputVariables, transformations ?? new List<ITransformation>()) {139 public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 140 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 141 141 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); 142 142 Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First())); -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
r11064 r11070 1582 1582 TrainingPartition.Start = 50; 1583 1583 } 1584 public TimeSeriesPrognosisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable )1585 : base(dataset, allowedInputVariables, targetVariable ) {1584 public TimeSeriesPrognosisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 1585 : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<ITransformation>()) { 1586 1586 Parameters.Add(new FixedValueParameter<IntValue>(TrainingHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each training sample.", new IntValue(1))); 1587 1587 Parameters.Add(new FixedValueParameter<IntValue>(TestHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each test sample.", new IntValue(1))); … … 1643 1643 1644 1644 var trainingDataStart = TrainingIndices.First(); 1645 1645 1646 1646 base.AdjustProblemDataProperties(problemData); 1647 1647 1648 1648 TestPartition.Start = trainingDataStart; 1649 1649
Note: See TracChangeset
for help on using the changeset viewer.