Changeset 7991 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs
- Timestamp:
- 06/12/12 14:27:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs
r7989 r7991 31 31 [Creatable("Problems")] 32 32 public class SymbolicTimeSeriesPrognosisSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<ITimeSeriesPrognosisProblemData, ISymbolicTimeSeriesPrognosisSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, ITimeSeriesPrognosisProblem { 33 private const double PunishmentFactor = 10; 33 34 private const int InitialMaximumTreeDepth = 8; 34 35 private const int InitialMaximumTreeLength = 25; … … 84 85 85 86 private void UpdateEstimationLimits() { 86 EstimationLimits.Upper = double.MaxValue; 87 EstimationLimits.Lower = double.MinValue; 87 if (ProblemData.TrainingIndizes.Any()) { 88 var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList(); 89 var mean = targetValues.Average(); 90 var range = targetValues.Max() - targetValues.Min(); 91 EstimationLimits.Upper = mean + PunishmentFactor * range; 92 EstimationLimits.Lower = mean - PunishmentFactor * range; 93 } else { 94 EstimationLimits.Upper = double.MaxValue; 95 EstimationLimits.Lower = double.MinValue; 96 } 88 97 } 89 98
Note: See TracChangeset
for help on using the changeset viewer.