Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2683


Ignore:
Timestamp:
01/25/10 15:26:00 (15 years ago)
Author:
gkronber
Message:

Implemented operator to calculate variable impacts based on the log of variable frequencies over the whole GP run and integrated operators into default SGP and OSGP algorithms. #853 (Operator to calculate variable impacts as integral over the relative frequencies of variable references over the whole GP run and the whole population)

Location:
trunk/sources
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.Algorithms/3.2/AlgorithmBase.cs

    r2566 r2683  
    287287      loop.AddSubOperator(seq);
    288288
     289      seq.AddSubOperator(CreateGenerationStepHook());
     290      seq.AddSubOperator(qualityCalculator);
     291      seq.AddSubOperator(loggingOperator);
     292      seq.AddSubOperator(counter);
    289293      seq.AddSubOperator(childCreater);
    290294      seq.AddSubOperator(replacement);
    291       seq.AddSubOperator(qualityCalculator);
    292       seq.AddSubOperator(CreateGenerationStepHook());
    293       seq.AddSubOperator(loggingOperator);
    294       seq.AddSubOperator(counter);
    295295      seq.AddSubOperator(terminationCriterionExtractor);
    296296      seq.AddSubOperator(loop);
  • trunk/sources/HeuristicLab.GP.Algorithms/3.2/OffspringSelectionGP.cs

    r2385 r2683  
    7070      injector.AddVariable(new HeuristicLab.Core.Variable("ComparisonFactor", new DoubleData()));
    7171      injector.AddVariable(new HeuristicLab.Core.Variable("SelectionPressureLimit", new DoubleData()));
     72      injector.AddVariable(new HeuristicLab.Core.Variable("SelectionPressure", new DoubleData(1)));
    7273      injector.AddVariable(new HeuristicLab.Core.Variable("SuccessRatioLimit", new DoubleData()));
    7374      return injector;
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs

    r2632 r2683  
    3030using System.Collections.Generic;
    3131using System;
     32using HeuristicLab.GP.Operators;
    3233
    3334namespace HeuristicLab.GP.StructureIdentification {
     
    6061      CombinedOperator op = new CombinedOperator();
    6162      SequentialProcessor seq = new SequentialProcessor();
     63
     64      SymbolFrequencyAnalyser symbolFrequencyAnalyser = new SymbolFrequencyAnalyser();
     65      seq.AddSubOperator(symbolFrequencyAnalyser);
     66
     67      VariableFrequencyAnalyser varFrequencyAnalyser = new VariableFrequencyAnalyser();
     68      seq.AddSubOperator(varFrequencyAnalyser);
     69
    6270      UniformSequentialSubScopesProcessor subScopesProc = new UniformSequentialSubScopesProcessor();
    6371      SequentialProcessor individualProc = new SequentialProcessor();
     
    170178      solutionProc.AddSubOperator(nodeImpactCalculator);
    171179
     180      VariableFrequencyBasedImpactCalculator frequencyImpactCalculator = new VariableFrequencyBasedImpactCalculator();
     181      solutionProc.AddSubOperator(frequencyImpactCalculator);
     182
    172183      #endregion
    173184
     
    198209        model.AddInputVariable(variableName);
    199210      }
     211      ItemList frequencyImpacts = bestModelScope.GetVariableValue<ItemList>(ModelingResult.RelativeFrequencyVariableImpact.ToString(), false);
     212      foreach (ItemList row in frequencyImpacts) {
     213        string variableName = ((StringData)row[0]).Data;
     214        double impact = ((DoubleData)row[1]).Data;
     215        model.SetVariableResult(ModelingResult.RelativeFrequencyVariableImpact, variableName, impact);
     216        model.AddInputVariable(variableName);
     217      }
     218
    200219      #endregion
    201220
  • trunk/sources/HeuristicLab.Modeling/3.2/ModelingResult.cs

    r2549 r2683  
    7979    VariableQualityImpact,
    8080    VariableEvaluationImpact,
    81     VariableNodeImpact
     81    VariableNodeImpact,
     82    RelativeFrequencyVariableImpact,
    8283  }
    8384}
Note: See TracChangeset for help on using the changeset viewer.