Changeset 16426 for branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Timestamp:
- 12/21/18 09:33:30 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r16413 r16426 28 28 using HeuristicLab.Parameters; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Problems.DataAnalysis.Implementation; 30 31 31 32 namespace HeuristicLab.Problems.DataAnalysis { … … 92 93 problemData.Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", (IntRange)new IntRange(0, 0).AsReadOnly())); 93 94 problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>())); 94 problemData.Parameters.Add(new FixedValueParameter< VariableRanges>(VariableRangesParameterName, new VariableRanges()));95 problemData.Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, new NamedIntervals())); 95 96 emptyProblemData = problemData; 96 97 } … … 101 102 } 102 103 103 public IFixedValueParameter< VariableRanges> VariableRangesParameter {104 get { return (IFixedValueParameter< VariableRanges>)Parameters[VariableRangesParameterName]; }104 public IFixedValueParameter<NamedIntervals> VariableRangesParameter { 105 get { return (IFixedValueParameter<NamedIntervals>)Parameters[VariableRangesParameterName]; } 105 106 } 106 107 … … 159 160 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); 160 161 Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First())); 161 Parameters.Add(new FixedValueParameter<VariableRanges>(VariableRangesParameterName, new VariableRanges())); 162 163 NamedIntervals namedIntervals = new NamedIntervals(); 164 foreach (var variable in variables) { 165 var variableInteval = Interval.GetInterval(dataset.GetDoubleValues(variable.Value)); 166 namedIntervals.Add(variable.Value, variableInteval); 167 } 168 169 Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, namedIntervals)); 162 170 RegisterParameterEvents(); 163 171 }
Note: See TracChangeset
for help on using the changeset viewer.