Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/21/13 16:33:47 (12 years ago)
Author:
sforsten
Message:

#1980:

  • added BestTrainingXCSSolutionAnalyzer and CurrentXCSSolutionAnalyzer
  • fixed bug: Equals method was not correct in CombinedIntegerVector
Location:
branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystem.cs

    r9154 r9175  
    112112      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
    113113    }
     114    private ValueParameter<MultiAnalyzer> FinalAnalyzerParameter {
     115      get { return (ValueParameter<MultiAnalyzer>)Parameters["FinalAnalyzer"]; }
     116    }
    114117    private ValueParameter<IntValue> MaxIterationsParameter {
    115118      get { return (ValueParameter<IntValue>)Parameters["MaxIterations"]; }
     
    197200      get { return AnalyzerParameter.Value; }
    198201      set { AnalyzerParameter.Value = value; }
     202    }
     203    public MultiAnalyzer FinalAnalyzer {
     204      get { return FinalAnalyzerParameter.Value; }
     205      set { FinalAnalyzerParameter.Value = value; }
    199206    }
    200207    private RandomCreator RandomCreator {
     
    228235      Parameters.Add(new ValueParameter<BoolValue>("DoActionSetSubsumption", "Specifies if action set is tested for subsuming classifiers.", new BoolValue(true)));
    229236      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
     237      Parameters.Add(new ValueParameter<MultiAnalyzer>("FinalAnalyzer", "The operator used to analyze the last generation.", new MultiAnalyzer()));
    230238      Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "The maximum number of iterations.", new IntValue(1000)));
    231239      #endregion
     
    246254
    247255      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
     256      mainLoop.FinalAnalyzerParameter.ActualName = FinalAnalyzerParameter.Name;
    248257      mainLoop.MaxIterationsParameter.ActualName = MaxIterationsParameter.Name;
    249258      #endregion
     
    298307    private void UpdateAnalyzers() {
    299308      Analyzer.Operators.Clear();
     309      FinalAnalyzer.Operators.Clear();
    300310      if (Problem != null) {
    301311        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
    302312          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
     313          FinalAnalyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
    303314        }
    304315      }
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystemMainLoop.cs

    r9167 r9175  
    6464      get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; }
    6565    }
     66    public ValueLookupParameter<IOperator> FinalAnalyzerParameter {
     67      get { return (ValueLookupParameter<IOperator>)Parameters["FinalAnalyzer"]; }
     68    }
    6669    #endregion
    6770
     
    110113      Parameters.Add(new LookupParameter<IntValue>("MaxIterations", "The maximum number of iterations the algorithm will do."));
    111114      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to analyze each generation."));
     115      Parameters.Add(new ValueLookupParameter<IOperator>("FinalAnalyzer", "The operator used to analyze the last generation."));
    112116      #endregion
    113117
     
    115119      VariableCreator variableCreator = new VariableCreator();
    116120      ResultsCollector resultsCollector = new ResultsCollector();
     121      Placeholder analyzer = new Placeholder();
    117122      Placeholder finalAnalyzer = new Placeholder();
    118123      ConditionalBranch initialPopulationConditionalBranch = new ConditionalBranch();
     
    179184      resultsCollector.ResultsParameter.ActualName = "Results";
    180185
    181       finalAnalyzer.Name = "Analyzer";
    182       finalAnalyzer.OperatorParameter.ActualName = "Analyzer";
     186      analyzer.Name = "Analyzer";
     187      analyzer.OperatorParameter.ActualName = "Analyzer";
     188
     189      finalAnalyzer.Name = "FinalAnalyzer";
     190      finalAnalyzer.OperatorParameter.ActualName = "FinalAnalyzer";
    183191
    184192      initialPopulationConditionalBranch.ConditionParameter.ActualName = "CreateInitialPopulation";
     
    349357      initialPopulationConditionalBranch.Successor = maxIterationsComparator;
    350358      maxIterationsComparator.Successor = terminationConditionalBranch1;
    351       //terminationConditionalBranch1.TrueBranch = finalAnalyzer;
     359      terminationConditionalBranch1.TrueBranch = finalAnalyzer;
    352360      terminationConditionalBranch1.FalseBranch = classifierFetcher;
    353361      classifierFetcher.Successor = matchCondtionSubScopesProcessor;
     
    406414      deletionSelectorAfterGA.Successor = leftReducerAfterGA;
    407415      leftReducerAfterGA.Successor = iterationCounter;
    408       //iterationCounter.Successor = maxIterationsComparator;
    409 
    410       iterationCounter.Successor = finalAnalyzer;
    411       finalAnalyzer.Successor = maxIterationsComparator;
     416      iterationCounter.Successor = analyzer;
     417      analyzer.Successor = maxIterationsComparator;
    412418      #endregion
    413419    }
Note: See TracChangeset for help on using the changeset viewer.