Changeset 1251
- Timestamp:
- 03/05/09 10:51:26 (16 years ago)
- Location:
- branches/CEDMA-Refactoring-Ticket419
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.Classification/HeuristicLab.GP.StructureIdentification.Classification.csproj
r1245 r1251 76 76 <Compile Include="ROCAnalyzer.cs" /> 77 77 <Compile Include="StandardGP.cs" /> 78 <Compile Include="StructIdProblemInjector.cs" /> 78 79 </ItemGroup> 79 80 <ItemGroup> -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.Classification/OffspringSelectionGP.cs
r1245 r1251 33 33 namespace HeuristicLab.GP.StructureIdentification.Classification { 34 34 public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP { 35 protected override IOperator CreateProblemInjector() { 36 return new StructIdProblemInjector(); 37 } 38 35 39 protected override IOperator CreateBestSolutionProcessor() { 36 40 IOperator seq = base.CreateBestSolutionProcessor(); … … 68 72 seq.AddSubOperator(validationAccuracy); 69 73 seq.AddSubOperator(testAccuracy); 74 seq.AddSubOperator(trainingConfusionMatrix); 75 seq.AddSubOperator(validationConfusionMatrix); 76 seq.AddSubOperator(testConfusionMatrix); 70 77 return seq; 71 78 } -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.Classification/StandardGP.cs
r1245 r1251 32 32 33 33 namespace HeuristicLab.GP.StructureIdentification.Classification { 34 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP { 34 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP { 35 36 protected override IOperator CreateProblemInjector() { 37 return new StructIdProblemInjector(); 38 } 39 35 40 protected override IOperator CreateBestSolutionProcessor() { 36 41 IOperator seq = base.CreateBestSolutionProcessor(); -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/HeuristicLab.GP.StructureIdentification.TimeSeries.csproj
r1245 r1251 73 73 <Compile Include="Properties\AssemblyInfo.cs" /> 74 74 <Compile Include="StandardGP.cs" /> 75 <Compile Include="StructIdProblemInjector.cs" /> 75 76 <Compile Include="TheilInequalityCoefficientEvaluator.cs" /> 76 77 </ItemGroup> … … 99 100 <Project>{1F1CF3ED-374C-4288-995B-93F6B872F571}</Project> 100 101 <Name>HeuristicLab.GP</Name> 102 </ProjectReference> 103 <ProjectReference Include="..\HeuristicLab.Logging\HeuristicLab.Logging.csproj"> 104 <Project>{4095C92C-5A4C-44BC-9963-5F384CF5CC3F}</Project> 105 <Name>HeuristicLab.Logging</Name> 101 106 </ProjectReference> 102 107 <ProjectReference Include="..\HeuristicLab.Operators\HeuristicLab.Operators.csproj"> -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/OffspringSelectionGP.cs
r1245 r1251 30 30 using HeuristicLab.Data; 31 31 using HeuristicLab.Operators; 32 using HeuristicLab.Logging; 32 33 33 34 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { … … 35 36 protected override IOperator CreateFunctionLibraryInjector() { 36 37 return new FunctionLibraryInjector(); 38 } 39 40 protected override IOperator CreateProblemInjector() { 41 return new StructIdProblemInjector(); 42 } 43 44 protected override IOperator CreateGlobalInjector() { 45 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector(); 46 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", new BoolData(false))); 47 return injector; 37 48 } 38 49 … … 63 74 testTheil.GetVariableInfo("TheilInequalityCoefficientCovariance").ActualName = "TestTheilInequalityCoefficientCovariance"; 64 75 76 SimpleEvaluator trainingEvaluator = new SimpleEvaluator(); 77 trainingEvaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart"; 78 trainingEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd"; 79 trainingEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesTraining"; 80 81 SimpleEvaluator validationEvaluator = new SimpleEvaluator(); 82 validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart"; 83 validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd"; 84 validationEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesValidation"; 85 86 SimpleEvaluator testEvaluator = new SimpleEvaluator(); 87 testEvaluator.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart"; 88 testEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd"; 89 testEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesTest"; 90 91 LinechartInjector trainingChartInjector = new LinechartInjector(); 92 trainingChartInjector.GetVariableValue<IntData>("NumberOfLines", null, false).Data = 2; 93 trainingChartInjector.GetVariableInfo("Values").ActualName = "PredictedValuesTraining"; 94 trainingChartInjector.GetVariableInfo("Linechart").ActualName = "LinechartTrainingPredictedValues"; 95 96 LinechartInjector validationChartInjector = new LinechartInjector(); 97 validationChartInjector.GetVariableValue<IntData>("NumberOfLines", null, false).Data = 2; 98 validationChartInjector.GetVariableInfo("Values").ActualName = "PredictedValuesValidation"; 99 validationChartInjector.GetVariableInfo("Linechart").ActualName = "LinechartValidationPredictedValues"; 100 101 LinechartInjector testChartInjector = new LinechartInjector(); 102 testChartInjector.GetVariableValue<IntData>("NumberOfLines", null, false).Data = 2; 103 testChartInjector.GetVariableInfo("Values").ActualName = "PredictedValuesTest"; 104 testChartInjector.GetVariableInfo("Linechart").ActualName = "LinechartTestPredictedValues"; 105 65 106 seq.AddSubOperator(trainingTheil); 66 107 seq.AddSubOperator(validationTheil); 67 108 seq.AddSubOperator(testTheil); 109 seq.AddSubOperator(trainingEvaluator); 110 seq.AddSubOperator(trainingChartInjector); 111 seq.AddSubOperator(validationEvaluator); 112 seq.AddSubOperator(validationChartInjector); 113 seq.AddSubOperator(testEvaluator); 114 seq.AddSubOperator(testChartInjector); 68 115 69 116 return seq; -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/StandardGP.cs
r1245 r1251 29 29 using HeuristicLab.DataAnalysis; 30 30 using HeuristicLab.Data; 31 using HeuristicLab.Operators; 32 using HeuristicLab.Logging; 31 33 32 34 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { … … 34 36 protected override IOperator CreateFunctionLibraryInjector() { 35 37 return new FunctionLibraryInjector(); 38 } 39 40 protected override IOperator CreateProblemInjector() { 41 return new StructIdProblemInjector(); 42 } 43 44 protected override IOperator CreateGlobalInjector() { 45 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector(); 46 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", new BoolData(false))); 47 return injector; 36 48 } 37 49 … … 62 74 testTheil.GetVariableInfo("TheilInequalityCoefficientCovariance").ActualName = "TestTheilInequalityCoefficientCovariance"; 63 75 76 SimpleEvaluator trainingEvaluator = new SimpleEvaluator(); 77 trainingEvaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart"; 78 trainingEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd"; 79 trainingEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesTraining"; 80 81 SimpleEvaluator validationEvaluator = new SimpleEvaluator(); 82 validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart"; 83 validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd"; 84 validationEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesValidation"; 85 86 SimpleEvaluator testEvaluator = new SimpleEvaluator(); 87 testEvaluator.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart"; 88 testEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd"; 89 testEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesTest"; 90 91 LinechartInjector trainingChartInjector = new LinechartInjector(); 92 trainingChartInjector.GetVariableValue<IntData>("NumberOfLines", null, false).Data = 2; 93 trainingChartInjector.GetVariableInfo("Values").ActualName = "PredictedValuesTraining"; 94 trainingChartInjector.GetVariableInfo("LineChart").ActualName = "LineChartTrainingPredictedValues"; 95 96 LinechartInjector validationChartInjector = new LinechartInjector(); 97 validationChartInjector.GetVariableValue<IntData>("NumberOfLines", null, false).Data = 2; 98 validationChartInjector.GetVariableInfo("Values").ActualName = "PredictedValuesValidation"; 99 validationChartInjector.GetVariableInfo("LineChart").ActualName = "LineChartValidationPredictedValues"; 100 101 LinechartInjector testChartInjector = new LinechartInjector(); 102 testChartInjector.GetVariableValue<IntData>("NumberOfLines", null, false).Data = 2; 103 testChartInjector.GetVariableInfo("Values").ActualName = "PredictedValuesTest"; 104 testChartInjector.GetVariableInfo("LineChart").ActualName = "LineChartTestPredictedValues"; 105 64 106 seq.AddSubOperator(trainingTheil); 65 107 seq.AddSubOperator(validationTheil); 66 108 seq.AddSubOperator(testTheil); 109 seq.AddSubOperator(trainingEvaluator); 110 seq.AddSubOperator(trainingChartInjector); 111 seq.AddSubOperator(validationEvaluator); 112 seq.AddSubOperator(validationChartInjector); 113 seq.AddSubOperator(testEvaluator); 114 seq.AddSubOperator(testChartInjector); 67 115 68 116 return seq; -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs
r1245 r1251 116 116 algo.Name = "GP"; 117 117 SequentialProcessor seq = new SequentialProcessor(); 118 EmptyOperator problemInjectorPlaceholder = new EmptyOperator();118 IOperator problemInjector = CreateProblemInjector(); 119 119 120 120 RandomInjector randomInjector = new RandomInjector(); … … 143 143 LeftReducer cleanUp = new LeftReducer(); 144 144 145 seq.AddSubOperator(problemInjector Placeholder);145 seq.AddSubOperator(problemInjector); 146 146 seq.AddSubOperator(randomInjector); 147 147 seq.AddSubOperator(globalInjector); … … 162 162 this.algorithm = seq; 163 163 return algo; 164 } 165 166 protected internal virtual IOperator CreateProblemInjector() { 167 return new EmptyOperator(); 164 168 } 165 169 -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGP.cs
r1245 r1251 87 87 Engine.OperatorGraph.AddOperator(algo); 88 88 Engine.OperatorGraph.InitialOperator = algo; 89 } 90 91 protected internal override IOperator CreateProblemInjector() { 92 return new StructIdProblemInjector(); 89 93 } 90 94
Note: See TracChangeset
for help on using the changeset viewer.