Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/23/13 10:18:22 (12 years ago)
Author:
mkommend
Message:

#1997: Added reevaluation of elits to symbolic data analysis island ga and changed evaluator to combine the fixed and random samples.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.DataAnalysis.Symbolic/3.3/SymbolicDataAnalysisIslandGeneticAlgorithm.cs

    r9172 r9182  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.Data;
     29using HeuristicLab.Operators;
    2930using HeuristicLab.Optimization;
    3031using HeuristicLab.Parameters;
     
    3334using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3435using HeuristicLab.Random;
     36using HeuristicLab.Selection;
    3537
    3638namespace HeuristicLab.Algorithms.DataAnalysis.Symbolic {
    3739  [Item("Symbolic DataAnalysis Island Genetic Algorithm", "A symbolic data analysis island genetic algorithm.")]
    38   [Creatable("Algorithms")]
     40  [Creatable("Data Analysis")]
    3941  [StorableClass]
    4042  public sealed class SymbolicDataAnalysisIslandGeneticAlgorithm : IslandGeneticAlgorithm {
     
    122124      insertionPoint.Successor = fixedSamplesPartitionCreator;
    123125
     126      //necessary to reevaluate elites
     127      var evaluatorPlaceHolder = new Placeholder();
     128      evaluatorPlaceHolder.OperatorParameter.ActualName = "Evaluator";
     129
     130      UniformSubScopesProcessor subScopesProcessor = new UniformSubScopesProcessor();
     131      subScopesProcessor.Name = "Reevaluate elites";
     132      subScopesProcessor.Parallel.Value = true;
     133      subScopesProcessor.Operator = evaluatorPlaceHolder;
     134      OperatorGraph.Iterate().OfType<RightReducer>().First().Successor = subScopesProcessor;
     135
    124136      RegisterParameterEvents();
    125137      RecalculateFixedSamplesPartitions();
     
    161173    }
    162174
    163    
     175
    164176    private void ParameterizeAnalyzers() {
    165177      foreach (var analyzer in Analyzer.Operators.OfType<ISymbolicDataAnalysisAnalyzer>()) {
     
    192204      if (Problem is IRegressionProblem) {
    193205        var evaluator = new SymbolicDataAnalysisIslandGAEvaluator<IRegressionProblemData>();
    194         evaluator.FixedSamplesParameter.ActualName = FixedSamplesParameterName;
    195206        evaluator.RandomSamplesParameter.ActualName = RandomSamplesParameterName;
    196207        EvaluatorParameter.Value = evaluator;
    197208      } else if (Problem is IClassificationProblem) {
    198209        var evaluator = new SymbolicDataAnalysisIslandGAEvaluator<IClassificationProblemData>();
    199         evaluator.FixedSamplesParameter.ActualName = FixedSamplesParameterName;
    200210        evaluator.RandomSamplesParameter.ActualName = RandomSamplesParameterName;
    201211        EvaluatorParameter.Value = evaluator;
Note: See TracChangeset for help on using the changeset viewer.