- Timestamp:
- 09/15/09 14:01:47 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLab.GP.StructureIdentification.Classification-3.3.csproj
r2351 r2356 81 81 <ItemGroup> 82 82 <Compile Include="ClassificationMeanSquaredErrorEvaluator.cs" /> 83 <Compile Include="DefaultClassificationAlgorithmOperators.cs" />84 83 <Compile Include="GPClassificationEvaluatorBase.cs" /> 85 84 <Compile Include="CrossValidation.cs" /> -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/OffspringSelectionGP.cs
r2344 r2356 23 23 using HeuristicLab.Modeling; 24 24 using HeuristicLab.Operators; 25 using HeuristicLab.Data; 25 26 26 27 namespace HeuristicLab.GP.StructureIdentification.Classification { 27 28 public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP, IClassificationAlgorithm { 28 29 29 protected override IOperator CreateProblemInjector() { 30 return DefaultClassificationAlgorithmOperators.CreateProblemInjector(); 30 public override string Name { 31 get { 32 return base.Name + " - Classification"; 33 } 31 34 } 32 35 33 protected override IOperator CreateP ostProcessingOperator() {34 return DefaultClassification AlgorithmOperators.CreatePostProcessingOperator();36 protected override IOperator CreateProblemInjector() { 37 return DefaultClassificationOperators.CreateProblemInjector(); 35 38 } 36 39 37 protected override IAnalyzerModel CreateGPModel() { 38 IAnalyzerModel model = base.CreateGPModel(); 39 DefaultClassificationAlgorithmOperators.SetModelData(model, Engine.GlobalScope.SubScopes[0]); 40 protected override IOperator CreateModelAnalyzerOperator() { 41 return DefaultClassificationOperators.CreatePostProcessingOperator(); 42 } 43 44 protected virtual IAnalyzerModel CreateGPModel() { 45 IScope bestModelScope = Engine.GlobalScope.SubScopes[0]; 46 var model = new AnalyzerModel(); 47 48 model.SetMetaData("SelectionPressure", bestModelScope.GetVariableValue<DoubleData>("SelectionPressure", false).Data); 49 DefaultStructureIdentificationOperators.PopulateAnalyzerModel(bestModelScope, model); 50 DefaultClassificationOperators.PopulateAnalyzerModel(bestModelScope, model); 51 40 52 return model; 41 53 } -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/StandardGP.cs
r2344 r2356 27 27 namespace HeuristicLab.GP.StructureIdentification.Classification { 28 28 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP, IClassificationAlgorithm { 29 public override string Name { 30 get { 31 return base.Name + " - Classification"; 32 } 33 } 34 29 35 protected override IOperator CreateProblemInjector() { 30 return DefaultClassification AlgorithmOperators.CreateProblemInjector();36 return DefaultClassificationOperators.CreateProblemInjector(); 31 37 } 32 33 protected override IOperator Create PostProcessingOperator() {34 return DefaultClassification AlgorithmOperators.CreatePostProcessingOperator();38 39 protected override IOperator CreateModelAnalyzerOperator() { 40 return DefaultClassificationOperators.CreatePostProcessingOperator(); 35 41 } 36 42 37 43 protected override IAnalyzerModel CreateGPModel() { 38 IAnalyzerModel model = base.CreateGPModel(); 39 DefaultClassificationAlgorithmOperators.SetModelData(model, Engine.GlobalScope.SubScopes[0]); 44 var model = new AnalyzerModel(); 45 var bestModelScope = Engine.GlobalScope.SubScopes[0]; 46 DefaultStructureIdentificationOperators.PopulateAnalyzerModel(bestModelScope, model); 47 DefaultClassificationOperators.PopulateAnalyzerModel(bestModelScope, model); 40 48 return model; 41 49 }
Note: See TracChangeset
for help on using the changeset viewer.