Changeset 9175 for branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems
- Timestamp:
- 01/21/13 16:33:47 (12 years ago)
- 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 112 112 get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; } 113 113 } 114 private ValueParameter<MultiAnalyzer> FinalAnalyzerParameter { 115 get { return (ValueParameter<MultiAnalyzer>)Parameters["FinalAnalyzer"]; } 116 } 114 117 private ValueParameter<IntValue> MaxIterationsParameter { 115 118 get { return (ValueParameter<IntValue>)Parameters["MaxIterations"]; } … … 197 200 get { return AnalyzerParameter.Value; } 198 201 set { AnalyzerParameter.Value = value; } 202 } 203 public MultiAnalyzer FinalAnalyzer { 204 get { return FinalAnalyzerParameter.Value; } 205 set { FinalAnalyzerParameter.Value = value; } 199 206 } 200 207 private RandomCreator RandomCreator { … … 228 235 Parameters.Add(new ValueParameter<BoolValue>("DoActionSetSubsumption", "Specifies if action set is tested for subsuming classifiers.", new BoolValue(true))); 229 236 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())); 230 238 Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "The maximum number of iterations.", new IntValue(1000))); 231 239 #endregion … … 246 254 247 255 mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name; 256 mainLoop.FinalAnalyzerParameter.ActualName = FinalAnalyzerParameter.Name; 248 257 mainLoop.MaxIterationsParameter.ActualName = MaxIterationsParameter.Name; 249 258 #endregion … … 298 307 private void UpdateAnalyzers() { 299 308 Analyzer.Operators.Clear(); 309 FinalAnalyzer.Operators.Clear(); 300 310 if (Problem != null) { 301 311 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) { 302 312 Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault); 313 FinalAnalyzer.Operators.Add(analyzer, analyzer.EnabledByDefault); 303 314 } 304 315 } -
branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystemMainLoop.cs
r9167 r9175 64 64 get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; } 65 65 } 66 public ValueLookupParameter<IOperator> FinalAnalyzerParameter { 67 get { return (ValueLookupParameter<IOperator>)Parameters["FinalAnalyzer"]; } 68 } 66 69 #endregion 67 70 … … 110 113 Parameters.Add(new LookupParameter<IntValue>("MaxIterations", "The maximum number of iterations the algorithm will do.")); 111 114 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.")); 112 116 #endregion 113 117 … … 115 119 VariableCreator variableCreator = new VariableCreator(); 116 120 ResultsCollector resultsCollector = new ResultsCollector(); 121 Placeholder analyzer = new Placeholder(); 117 122 Placeholder finalAnalyzer = new Placeholder(); 118 123 ConditionalBranch initialPopulationConditionalBranch = new ConditionalBranch(); … … 179 184 resultsCollector.ResultsParameter.ActualName = "Results"; 180 185 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"; 183 191 184 192 initialPopulationConditionalBranch.ConditionParameter.ActualName = "CreateInitialPopulation"; … … 349 357 initialPopulationConditionalBranch.Successor = maxIterationsComparator; 350 358 maxIterationsComparator.Successor = terminationConditionalBranch1; 351 //terminationConditionalBranch1.TrueBranch = finalAnalyzer;359 terminationConditionalBranch1.TrueBranch = finalAnalyzer; 352 360 terminationConditionalBranch1.FalseBranch = classifierFetcher; 353 361 classifierFetcher.Successor = matchCondtionSubScopesProcessor; … … 406 414 deletionSelectorAfterGA.Successor = leftReducerAfterGA; 407 415 leftReducerAfterGA.Successor = iterationCounter; 408 //iterationCounter.Successor = maxIterationsComparator; 409 410 iterationCounter.Successor = finalAnalyzer; 411 finalAnalyzer.Successor = maxIterationsComparator; 416 iterationCounter.Successor = analyzer; 417 analyzer.Successor = maxIterationsComparator; 412 418 #endregion 413 419 }
Note: See TracChangeset
for help on using the changeset viewer.