- Timestamp:
- 09/08/09 11:11:50 (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/DefaultClassificationAlgorithmOperators.cs
r2341 r2344 55 55 testAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd"; 56 56 57 ConfusionMatrixEvaluator trainingConfusionMatrix = new ConfusionMatrixEvaluator();58 trainingConfusionMatrix.Name = "TrainingConfusionMatrixEvaluator";59 trainingConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TrainingConfusionMatrix";60 trainingConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";61 trainingConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";62 63 ConfusionMatrixEvaluator validationConfusionMatrix = new ConfusionMatrixEvaluator();64 validationConfusionMatrix.Name = "ValidationConfusionMatrixEvaluator";65 validationConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "ValidationConfusionMatrix";66 validationConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";67 validationConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";68 69 ConfusionMatrixEvaluator testConfusionMatrix = new ConfusionMatrixEvaluator();70 testConfusionMatrix.Name = "TestConfusionMatrixEvaluator";71 testConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TestConfusionMatrix";72 testConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";73 testConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";74 75 57 individualProc.AddSubOperator(trainingAccuracy); 76 58 individualProc.AddSubOperator(validationAccuracy); 77 59 individualProc.AddSubOperator(testAccuracy); 78 individualProc.AddSubOperator(trainingConfusionMatrix);79 individualProc.AddSubOperator(validationConfusionMatrix);80 individualProc.AddSubOperator(testConfusionMatrix);81 60 return seq; 82 61 } … … 92 71 return op; 93 72 } 73 74 internal static void SetModelData(IAnalyzerModel model, IScope scope) { 75 model.SetResult("TrainingAccuracy", scope.GetVariableValue<DoubleData>("TrainingAccuracy", true).Data); 76 model.SetResult("ValidationAccuracy", scope.GetVariableValue<DoubleData>("ValidationAccuracy", true).Data); 77 model.SetResult("TestAccuracy", scope.GetVariableValue<DoubleData>("TestAccuracy", true).Data); 78 } 94 79 } 95 80 } -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/OffspringSelectionGP.cs
r2341 r2344 34 34 return DefaultClassificationAlgorithmOperators.CreatePostProcessingOperator(); 35 35 } 36 37 protected override IAnalyzerModel CreateGPModel() { 38 IAnalyzerModel model = base.CreateGPModel(); 39 DefaultClassificationAlgorithmOperators.SetModelData(model, Engine.GlobalScope.SubScopes[0]); 40 return model; 41 } 36 42 } 37 43 } -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/StandardGP.cs
r2341 r2344 27 27 namespace HeuristicLab.GP.StructureIdentification.Classification { 28 28 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP, IClassificationAlgorithm { 29 protected override IOperator CreateProblemInjector() { 30 return DefaultClassificationAlgorithmOperators.CreateProblemInjector(); 31 } 32 29 33 protected override IOperator CreatePostProcessingOperator() { 30 34 return DefaultClassificationAlgorithmOperators.CreatePostProcessingOperator(); 35 } 36 37 protected override IAnalyzerModel CreateGPModel() { 38 IAnalyzerModel model = base.CreateGPModel(); 39 DefaultClassificationAlgorithmOperators.SetModelData(model, Engine.GlobalScope.SubScopes[0]); 40 return model; 31 41 } 32 42 }
Note: See TracChangeset
for help on using the changeset viewer.