- Timestamp:
- 12/16/21 10:23:29 (3 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol merged: 18140
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis merged: 18140
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis/3.4 merged: 18140
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
r18034 r18141 189 189 if (variableRanges == null) { 190 190 variableRanges = Dataset.GetVariableRanges(); 191 } 191 }else { 192 foreach (var entry in variableRanges.GetVariableIntervals()) 193 VariableRanges.SetInterval(entry.Item1, entry.Item2); 194 } 195 192 196 Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, variableRanges)); 193 197 -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r18034 r18141 158 158 159 159 public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, 160 IEnumerable<ITransformation> transformations = null/*, 161 IntervalCollection variableRanges = null*/) 162 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 160 IEnumerable<ITransformation> transformations = null, IntervalCollection variableRanges = null) 161 : base(dataset, allowedInputVariables, transformations, variableRanges) { 163 162 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); 164 163 Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First())); 165 /*if (variableRanges == null) { 166 variableRanges = Dataset.GetVariableRanges(); 167 } 168 Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, variableRanges));*/ 164 169 165 } 170 166 private void RegisterParameterEvents() { -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ShapeConstrainedRegressionProblemData.cs
r18111 r18141 144 144 public ShapeConstrainedRegressionProblemData(IRegressionProblemData regressionProblemData) 145 145 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable, 146 regressionProblemData.TrainingPartition, regressionProblemData.TestPartition, regressionProblemData.Transformations, 147 (regressionProblemData is ShapeConstrainedRegressionProblemData) ? ((ShapeConstrainedRegressionProblemData)regressionProblemData).ShapeConstraints : null, 148 regressionProblemData.VariableRanges) { 146 regressionProblemData.TrainingPartition, regressionProblemData.TestPartition, (regressionProblemData is ShapeConstrainedRegressionProblemData) ? ((ShapeConstrainedRegressionProblemData)regressionProblemData).ShapeConstraints : null, 147 regressionProblemData.Transformations, regressionProblemData.VariableRanges) { 149 148 } 150 149 151 150 public ShapeConstrainedRegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, 152 IntRange trainingPartition, IntRange testPartition, 153 IEnumerable<ITransformation> transformations = null, ShapeConstraints sc = null,IntervalCollection variableRanges = null)154 : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<ITransformation>()) {151 IntRange trainingPartition, IntRange testPartition, ShapeConstraints sc = null, 152 IEnumerable<ITransformation> transformations = null, IntervalCollection variableRanges = null) 153 : base(dataset, allowedInputVariables, targetVariable, transformations, variableRanges) { 155 154 TrainingPartition.Start = trainingPartition.Start; 156 155 TrainingPartition.End = trainingPartition.End; … … 159 158 if (sc == null) sc = new ShapeConstraints(); 160 159 Parameters.Add(new FixedValueParameter<ShapeConstraints>(ShapeConstraintsParameterName, "Specifies the shape constraints for the regression problem.", (ShapeConstraints)sc.Clone())); 161 if (variableRanges != null) {162 foreach (var entry in variableRanges.GetVariableIntervals())163 VariableRanges.SetInterval(entry.Item1, entry.Item2);164 }165 160 RegisterEventHandlers(); 166 161 }
Note: See TracChangeset
for help on using the changeset viewer.