Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/09 12:48:18 (16 years ago)
Author:
gkronber
Message:

Merged change sets from CEDMA branch to trunk:

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

Legend:

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

    r852 r1287  
    6767    <Compile Include="ClassificationMeanSquaredErrorEvaluator.cs" />
    6868    <Compile Include="ConfusionMatrixEvaluator.cs" />
    69     <Compile Include="DatasetShuffler.cs" />
    7069    <Compile Include="GPClassificationEvaluatorBase.cs" />
    7170    <Compile Include="CrossValidation.cs" />
    72     <Compile Include="FunctionLibraryInjector.cs">
    73       <SubType>Code</SubType>
    74     </Compile>
    7571    <Compile Include="HeuristicLabGPClassificationPlugin.cs" />
    7672    <Compile Include="MulticlassModeller.cs" />
    7773    <Compile Include="MulticlassOneVsOneAnalyzer.cs" />
     74    <Compile Include="OffspringSelectionGP.cs" />
     75    <Compile Include="ProblemInjector.cs" />
    7876    <Compile Include="Properties\AssemblyInfo.cs" />
    7977    <Compile Include="ROCAnalyzer.cs" />
     78    <Compile Include="StandardGP.cs" />
    8079  </ItemGroup>
    8180  <ItemGroup>
     
    103102      <Project>{1F1CF3ED-374C-4288-995B-93F6B872F571}</Project>
    104103      <Name>HeuristicLab.GP</Name>
     104    </ProjectReference>
     105    <ProjectReference Include="..\HeuristicLab.Operators\HeuristicLab.Operators.csproj">
     106      <Project>{A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</Project>
     107      <Name>HeuristicLab.Operators</Name>
    105108    </ProjectReference>
    106109    <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/OffspringSelectionGP.cs

    r1245 r1287  
    3333namespace HeuristicLab.GP.StructureIdentification.Classification {
    3434  public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP {
     35    protected override IOperator CreateProblemInjector() {
     36      return new ProblemInjector();
     37    }
     38
    3539    protected override IOperator CreateBestSolutionProcessor() {
    3640      IOperator seq = base.CreateBestSolutionProcessor();
    37       AccuracyEvaluator trainingAccuracy = new AccuracyEvaluator();
    38       trainingAccuracy.GetVariableInfo("Accuracy").ActualName = "TrainingAccuracy";
    39       trainingAccuracy.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
    40       trainingAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
    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 = "TrainingSamplesStart";
    55       trainingConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
    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);
     41      seq.AddSubOperator(StandardGP.BestSolutionProcessor);
    7042      return seq;
    7143    }
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/StandardGP.cs

    r1245 r1287  
    3030using HeuristicLab.Random;
    3131using HeuristicLab.Data;
     32using HeuristicLab.Operators;
    3233
    3334namespace HeuristicLab.GP.StructureIdentification.Classification {
    34   public class StandardGP :  HeuristicLab.GP.StructureIdentification.StandardGP {
     35  public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP {
     36
     37    protected override IOperator CreateProblemInjector() {
     38      return new ProblemInjector();
     39    }
     40
    3541    protected override IOperator CreateBestSolutionProcessor() {
    3642      IOperator seq = base.CreateBestSolutionProcessor();
    37       AccuracyEvaluator trainingAccuracy = new AccuracyEvaluator();
    38       trainingAccuracy.GetVariableInfo("Accuracy").ActualName = "TrainingAccuracy";
    39       trainingAccuracy.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
    40       trainingAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
     43      seq.AddSubOperator(BestSolutionProcessor);
     44      return seq;
     45    }
    4146
    42       AccuracyEvaluator validationAccuracy = new AccuracyEvaluator();
    43       validationAccuracy.GetVariableInfo("Accuracy").ActualName = "ValidationAccuracy";
    44       validationAccuracy.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
    45       validationAccuracy.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
     47    internal static IOperator BestSolutionProcessor {
     48      get {
     49        SequentialProcessor seq = new SequentialProcessor();
     50        AccuracyEvaluator trainingAccuracy = new AccuracyEvaluator();
     51        trainingAccuracy.GetVariableInfo("Accuracy").ActualName = "TrainingAccuracy";
     52        trainingAccuracy.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
     53        trainingAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
    4654
    47       AccuracyEvaluator testAccuracy = new AccuracyEvaluator();
    48       testAccuracy.GetVariableInfo("Accuracy").ActualName = "TestAccuracy";
    49       testAccuracy.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
    50       testAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
     55        AccuracyEvaluator validationAccuracy = new AccuracyEvaluator();
     56        validationAccuracy.GetVariableInfo("Accuracy").ActualName = "ValidationAccuracy";
     57        validationAccuracy.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
     58        validationAccuracy.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
    5159
    52       ConfusionMatrixEvaluator trainingConfusionMatrix = new ConfusionMatrixEvaluator();
    53       trainingConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TrainingConfusionMatrix";
    54       trainingConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
    55       trainingConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
     60        AccuracyEvaluator testAccuracy = new AccuracyEvaluator();
     61        testAccuracy.GetVariableInfo("Accuracy").ActualName = "TestAccuracy";
     62        testAccuracy.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
     63        testAccuracy.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
    5664
    57       ConfusionMatrixEvaluator validationConfusionMatrix = new ConfusionMatrixEvaluator();
    58       validationConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "ValidationConfusionMatrix";
    59       validationConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
    60       validationConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
     65        ConfusionMatrixEvaluator trainingConfusionMatrix = new ConfusionMatrixEvaluator();
     66        trainingConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TrainingConfusionMatrix";
     67        trainingConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
     68        trainingConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
    6169
    62       ConfusionMatrixEvaluator testConfusionMatrix = new ConfusionMatrixEvaluator();
    63       testConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TestConfusionMatrix";
    64       testConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
    65       testConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
     70        ConfusionMatrixEvaluator validationConfusionMatrix = new ConfusionMatrixEvaluator();
     71        validationConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "ValidationConfusionMatrix";
     72        validationConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
     73        validationConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
    6674
    67       seq.AddSubOperator(trainingAccuracy);
    68       seq.AddSubOperator(validationAccuracy);
    69       seq.AddSubOperator(testAccuracy);
    70       return seq;
     75        ConfusionMatrixEvaluator testConfusionMatrix = new ConfusionMatrixEvaluator();
     76        testConfusionMatrix.GetVariableInfo("ConfusionMatrix").ActualName = "TestConfusionMatrix";
     77        testConfusionMatrix.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
     78        testConfusionMatrix.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
     79
     80        seq.AddSubOperator(trainingAccuracy);
     81        seq.AddSubOperator(validationAccuracy);
     82        seq.AddSubOperator(testAccuracy);
     83        seq.AddSubOperator(trainingConfusionMatrix);
     84        seq.AddSubOperator(validationConfusionMatrix);
     85        seq.AddSubOperator(testConfusionMatrix);
     86        return seq;
     87      }
    7188    }
    7289  }
Note: See TracChangeset for help on using the changeset viewer.