Changeset 9182 for branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.DataAnalysis.Symbolic/3.3/SymbolicDataAnalysisIslandGeneticAlgorithm.cs
- Timestamp:
- 01/23/13 10:18:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.DataAnalysis.Symbolic/3.3/SymbolicDataAnalysisIslandGeneticAlgorithm.cs
r9172 r9182 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.Operators; 29 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Parameters; … … 33 34 using HeuristicLab.Problems.DataAnalysis.Symbolic; 34 35 using HeuristicLab.Random; 36 using HeuristicLab.Selection; 35 37 36 38 namespace HeuristicLab.Algorithms.DataAnalysis.Symbolic { 37 39 [Item("Symbolic DataAnalysis Island Genetic Algorithm", "A symbolic data analysis island genetic algorithm.")] 38 [Creatable(" Algorithms")]40 [Creatable("Data Analysis")] 39 41 [StorableClass] 40 42 public sealed class SymbolicDataAnalysisIslandGeneticAlgorithm : IslandGeneticAlgorithm { … … 122 124 insertionPoint.Successor = fixedSamplesPartitionCreator; 123 125 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 124 136 RegisterParameterEvents(); 125 137 RecalculateFixedSamplesPartitions(); … … 161 173 } 162 174 163 175 164 176 private void ParameterizeAnalyzers() { 165 177 foreach (var analyzer in Analyzer.Operators.OfType<ISymbolicDataAnalysisAnalyzer>()) { … … 192 204 if (Problem is IRegressionProblem) { 193 205 var evaluator = new SymbolicDataAnalysisIslandGAEvaluator<IRegressionProblemData>(); 194 evaluator.FixedSamplesParameter.ActualName = FixedSamplesParameterName;195 206 evaluator.RandomSamplesParameter.ActualName = RandomSamplesParameterName; 196 207 EvaluatorParameter.Value = evaluator; 197 208 } else if (Problem is IClassificationProblem) { 198 209 var evaluator = new SymbolicDataAnalysisIslandGAEvaluator<IClassificationProblemData>(); 199 evaluator.FixedSamplesParameter.ActualName = FixedSamplesParameterName;200 210 evaluator.RandomSamplesParameter.ActualName = RandomSamplesParameterName; 201 211 EvaluatorParameter.Value = evaluator;
Note: See TracChangeset
for help on using the changeset viewer.