Changeset 9164
- Timestamp:
- 01/15/13 13:56:48 (12 years ago)
- Location:
- branches/Sliding Window GP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs
r9162 r9164 32 32 private const string ProblemDataParameterName = "ProblemData"; 33 33 private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition"; 34 private const string ValidationPartitionParameterName = "ValidationPartition"; 34 35 private const string SlidingWindowSizeParameterName = "Sliding Window Size"; 36 private const string ValidationSlidingWindowSizeParameterName = "Validation Sliding Window Size"; 35 37 private const string SlidingWindowStepWidthParameterName = "Sliding Window Step Width"; 36 38 private const string InitialSlidingWindowParameterName = "Initial Sliding Window"; … … 44 46 get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; } 45 47 } 48 public ILookupParameter<IntRange> ValidationPartitionParameter { 49 get { return (ILookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; } 50 } 46 51 public IFixedValueParameter<IntValue> SlidingWindowSizeParameter { 47 52 get { return (IFixedValueParameter<IntValue>)Parameters[SlidingWindowSizeParameterName]; } 53 } 54 public IFixedValueParameter<IntValue> ValidationSlidingWindowSizeParameter { 55 get { return (IFixedValueParameter<IntValue>)Parameters[ValidationSlidingWindowSizeParameterName]; } 48 56 } 49 57 public IFixedValueParameter<IntValue> SlidingWindowStepWidthParameter { … … 61 69 public override bool EnabledByDefault { get { return false; } } 62 70 public IntValue SlidingWindowSize { get { return SlidingWindowSizeParameter.Value; } } 71 public IntValue ValidiationSlidingWindowSize { get { return ValidationSlidingWindowSizeParameter.Value; } } 63 72 public IntValue SlidingWindowStepWidth { get { return SlidingWindowStepWidthParameter.Value; } } 64 73 public IntRange InitialSlidingWindow { get { return InitialSlidingWindowParameter.Value; } } … … 75 84 Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated.")); 76 85 Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, "")); 86 Parameters.Add(new LookupParameter<IntRange>(ValidationPartitionParameterName, "")); 77 87 Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowSizeParameterName, "", new IntValue(1))); 88 Parameters.Add(new FixedValueParameter<IntValue>(ValidationSlidingWindowSizeParameterName, "", new IntValue(0))); 78 89 Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowStepWidthParameterName, "", new IntValue(1))); 79 90 Parameters.Add(new FixedValueParameter<IntRange>(InitialSlidingWindowParameterName, "", new IntRange(0, 1))); … … 88 99 TerminateSlidingWindowParameter.ActualValue = new BoolValue(false); 89 100 FitnessCalculationPartitionParameter.ActualValue = (IntRange)InitialSlidingWindow.Clone(); 101 ValidationPartitionParameter.ActualValue = new IntRange(InitialSlidingWindow.End, InitialSlidingWindow.End + ValidiationSlidingWindowSize.Value); 90 102 return base.Apply(); 91 103 } … … 108 120 FitnessCalculationPartitionParameter.ActualValue.Start = fitnessPartition.Start; 109 121 FitnessCalculationPartitionParameter.ActualValue.End = fitnessPartition.End; 122 ValidationPartitionParameter.ActualValue.Start = fitnessPartition.End; 123 ValidationPartitionParameter.ActualValue.End = ValidationPartitionParameter.ActualValue.Start + ValidiationSlidingWindowSize.Value; 110 124 } 111 125
Note: See TracChangeset
for help on using the changeset viewer.