- Timestamp:
- 09/15/09 14:01:47 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLab.GP.StructureIdentification.TimeSeries-3.3.csproj
r2352 r2356 83 83 <ItemGroup> 84 84 <Compile Include="AveragePercentageChangeEvaluator.cs" /> 85 <Compile Include="DefaultTimeSeriesOperators.cs" />86 85 <Compile Include="HeuristicLabGPTimeSeriesPlugin.cs" /> 87 86 <Compile Include="OffspringSelectionGP.cs" /> -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGP.cs
r2344 r2356 29 29 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 30 30 public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP, ITimeSeriesAlgorithm { 31 public override string Name { 32 get { 33 return base.Name + " - time series prognosis"; 34 } 35 } 31 36 32 37 public int MinTimeOffset { … … 50 55 51 56 protected override IOperator CreateFunctionLibraryInjector() { 52 return DefaultTimeSeriesOperators.CreateFunctionLibraryInjector(); 53 } 54 55 protected override IOperator CreatePostProcessingOperator() { 56 return DefaultTimeSeriesOperators.CreatePostProcessingOperator(); 57 CombinedOperator op = new CombinedOperator(); 58 op.Name = "FunctionLibraryInjector"; 59 SequentialProcessor seq = new SequentialProcessor(); 60 FunctionLibraryInjector funLibInjector = new FunctionLibraryInjector(); 61 funLibInjector.GetVariable("Differentials").Value = new BoolData(true); 62 seq.AddSubOperator(funLibInjector); 63 seq.AddSubOperator(new HL3TreeEvaluatorInjector()); 64 op.OperatorGraph.AddOperator(seq); 65 op.OperatorGraph.InitialOperator = seq; 66 return op; 57 67 } 58 68 … … 65 75 } 66 76 77 protected override IOperator CreateModelAnalyzerOperator() { 78 return DefaultTimeSeriesOperators.CreatePostProcessingOperator(); 79 } 80 67 81 protected override IAnalyzerModel CreateGPModel() { 68 IAnalyzerModel model = base.CreateGPModel(); 69 DefaultTimeSeriesOperators.SetModelData(model, Engine.GlobalScope.SubScopes[0]); 82 var model = new AnalyzerModel(); 83 var bestModelScope = Engine.GlobalScope.SubScopes[0]; 84 model.SetMetaData("SelectionPressure", bestModelScope.GetVariableValue<DoubleData>("SelectionPressure", false).Data); 85 DefaultStructureIdentificationOperators.PopulateAnalyzerModel(bestModelScope, model); 86 DefaultTimeSeriesOperators.PopulateAnalyzerModel(bestModelScope, model); 70 87 return model; 71 88 } -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGP.cs
r2344 r2356 29 29 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 30 30 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP, ITimeSeriesAlgorithm { 31 public override string Name { 32 get { 33 return base.Name + " - time series prognosis"; 34 } 35 } 36 31 37 public int MinTimeOffset { 32 38 get { return GetVariableInjector().GetVariable("MinTimeOffset").GetValue<IntData>().Data; } … … 49 55 50 56 protected override IOperator CreateFunctionLibraryInjector() { 51 return DefaultTimeSeriesOperators.CreateFunctionLibraryInjector(); 57 CombinedOperator op = new CombinedOperator(); 58 op.Name = "FunctionLibraryInjector"; 59 SequentialProcessor seq = new SequentialProcessor(); 60 FunctionLibraryInjector funLibInjector = new FunctionLibraryInjector(); 61 funLibInjector.GetVariable("Differentials").Value = new BoolData(true); 62 seq.AddSubOperator(funLibInjector); 63 seq.AddSubOperator(new HL3TreeEvaluatorInjector()); 64 op.OperatorGraph.AddOperator(seq); 65 op.OperatorGraph.InitialOperator = seq; 66 return op; 52 67 } 53 68 54 protected override IOperator Create PostProcessingOperator() {69 protected override IOperator CreateModelAnalyzerOperator() { 55 70 return DefaultTimeSeriesOperators.CreatePostProcessingOperator(); 56 71 } … … 65 80 66 81 protected override IAnalyzerModel CreateGPModel() { 67 IAnalyzerModel model = base.CreateGPModel(); 68 DefaultTimeSeriesOperators.SetModelData(model, Engine.GlobalScope.SubScopes[0]); 82 var model = new AnalyzerModel(); 83 var bestModelScope = Engine.GlobalScope.SubScopes[0]; 84 DefaultStructureIdentificationOperators.PopulateAnalyzerModel(bestModelScope, model); 85 DefaultTimeSeriesOperators.PopulateAnalyzerModel(bestModelScope, model); 69 86 return model; 70 87 }
Note: See TracChangeset
for help on using the changeset viewer.