Changeset 16699
- Timestamp:
- 03/20/19 09:41:45 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r16644 r16699 94 94 problemData.Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", (IntRange)new IntRange(0, 0).AsReadOnly())); 95 95 problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>())); 96 problemData.Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, "", new NamedIntervals()));96 problemData.Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, "", new NamedIntervals())); 97 97 problemData.Parameters.Add(new FixedValueParameter<TextValue>(IntervalConstraintsParameterName, "", new TextValue())); 98 98 emptyProblemData = problemData; … … 108 108 public NamedIntervals VariableRanges => VariableRangesParameter.Value; 109 109 110 public IFixedValueParameter<TextValue> IntervalConstraintsParameter => (IFixedValueParameter<TextValue>) 110 public IFixedValueParameter<TextValue> IntervalConstraintsParameter => (IFixedValueParameter<TextValue>)Parameters[IntervalConstraintsParameterName]; 111 111 public TextValue IntervalConstraints => IntervalConstraintsParameter.Value; 112 112 … … 168 168 NamedIntervals namedIntervals = new NamedIntervals(); 169 169 foreach (var variable in variables) { 170 var variableInteval = Interval.GetInterval(dataset.GetDoubleValues(variable.Value)); 171 namedIntervals.Add(variable.Value, variableInteval); 170 if (!dataset.DoubleVariables.Contains(variable.Value)) continue; // intervals are only possible for double variables 171 var variableInterval = Interval.GetInterval(dataset.GetDoubleValues(variable.Value)); 172 namedIntervals.Add(variable.Value, variableInterval); 172 173 } 173 174
Note: See TracChangeset
for help on using the changeset viewer.