Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/07/09 19:08:18 (15 years ago)
Author:
gkronber
Message:

Merged changeset r2330:2340 from #720 refactoring branch to the trunk. (r2331, r2335, r2337, r2340)

Location:
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/HeuristicLab.GP.StructureIdentification.Classification-3.3.csproj

    r2328 r2341  
    8383    <Compile Include="ClassificationMeanSquaredErrorEvaluator.cs" />
    8484    <Compile Include="ConfusionMatrixEvaluator.cs" />
     85    <Compile Include="TargetClassesCalculator.cs" />
     86    <Compile Include="DefaultClassificationAlgorithmOperators.cs" />
    8587    <Compile Include="GPClassificationEvaluatorBase.cs" />
    8688    <Compile Include="CrossValidation.cs" />
     
    109111      <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
    110112      <Name>HeuristicLab.Data-3.2</Name>
     113    </ProjectReference>
     114    <ProjectReference Include="..\..\HeuristicLab.GP.Algorithms\3.2\HeuristicLab.GP.Algorithms-3.2.csproj">
     115      <Project>{3127719F-110E-4558-8845-98559DBB422D}</Project>
     116      <Name>HeuristicLab.GP.Algorithms-3.2</Name>
    111117    </ProjectReference>
    112118    <ProjectReference Include="..\..\HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj">
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/OffspringSelectionGP.cs

    r2319 r2341  
    2727  public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP, IClassificationAlgorithm {
    2828
    29     protected override IOperator CreateBestSolutionProcessor() {
    30       IOperator seq = new SequentialProcessor();
    31       seq.AddSubOperator(base.CreateBestSolutionProcessor());
    32       seq.AddSubOperator(StandardGP.BestSolutionProcessor);
    33       return seq;
     29    protected override IOperator CreateProblemInjector() {
     30      return DefaultClassificationAlgorithmOperators.CreateProblemInjector();
     31    }
     32
     33    protected override IOperator CreatePostProcessingOperator() {
     34      return DefaultClassificationAlgorithmOperators.CreatePostProcessingOperator();
    3435    }
    3536  }
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/3.3/StandardGP.cs

    r2319 r2341  
    2323using HeuristicLab.Modeling;
    2424using HeuristicLab.Operators;
     25using System;
    2526
    2627namespace HeuristicLab.GP.StructureIdentification.Classification {
    2728  public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP, IClassificationAlgorithm {
    28     protected override IOperator CreateBestSolutionProcessor() {
    29       IOperator bestSolutionProcessor = BestSolutionProcessor;
    30       bestSolutionProcessor.AddSubOperator(base.CreateBestSolutionProcessor());
    31       return bestSolutionProcessor;
    32     }
    33 
    34     internal static IOperator BestSolutionProcessor {
    35       get {
    36         SequentialProcessor seq = new SequentialProcessor();
    37         AccuracyEvaluator trainingAccuracy = new AccuracyEvaluator();
    38         trainingAccuracy.GetVariableInfo("Accuracy").ActualName = "TrainingAccuracy";
    39         trainingAccuracy.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
    40         trainingAccuracy.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
    41 
    42         AccuracyEvaluator validationAccuracy = new AccuracyEvaluator();
    43         validationAccuracy.GetVariableInfo("Accuracy").ActualName = "ValidationAccuracy";
    44         validationAccuracy.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
    45         validationAccuracy.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
    46 
    47         AccuracyEvaluator testAccuracy = new AccuracyEvaluator();
    48         testAccuracy.GetVariableInfo("Accuracy").ActualName = "TestAccuracy";
    49         testAccuracy.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
    50         testAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
    51 
    52         ConfusionMatrixEvaluator trainingConfusionMatrix = new ConfusionMatrixEvaluator();
    53         trainingConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TrainingConfusionMatrix";
    54         trainingConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
    55         trainingConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
    56 
    57         ConfusionMatrixEvaluator validationConfusionMatrix = new ConfusionMatrixEvaluator();
    58         validationConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "ValidationConfusionMatrix";
    59         validationConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
    60         validationConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
    61 
    62         ConfusionMatrixEvaluator testConfusionMatrix = new ConfusionMatrixEvaluator();
    63         testConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TestConfusionMatrix";
    64         testConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
    65         testConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
    66 
    67         seq.AddSubOperator(trainingAccuracy);
    68         seq.AddSubOperator(validationAccuracy);
    69         seq.AddSubOperator(testAccuracy);
    70         seq.AddSubOperator(trainingConfusionMatrix);
    71         seq.AddSubOperator(validationConfusionMatrix);
    72         seq.AddSubOperator(testConfusionMatrix);
    73         return seq;
    74       }
     29    protected override IOperator CreatePostProcessingOperator() {
     30      return DefaultClassificationAlgorithmOperators.CreatePostProcessingOperator();
    7531    }
    7632  }
Note: See TracChangeset for help on using the changeset viewer.