Changeset 7991
- Timestamp:
- 06/12/12 14:27:49 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4
- Files:
-
- 2 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 -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisExpressionTreeInterpreter.cs
r7989 r7991 99 99 100 100 int j = 0; 101 foreach (var targetValue in dataset.GetDoubleValues( TargetVariable, invalidateCacheIndexes)) {101 foreach (var targetValue in dataset.GetDoubleValues(targetVariable, invalidateCacheIndexes)) { 102 102 targetVariableCache[invalidateCacheIndexes[j]] = targetValue; 103 103 j++;
Note: See TracChangeset
for help on using the changeset viewer.