Free cookie consent management tool by TermsFeed Policy Generator

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/HeuristicLab.GP.StructureIdentification/3.3
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.