Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/05/13 13:12:54 (12 years ago)
Author:
sforsten
Message:

#1980:

  • added be project Optimization.Operators.LCS
  • added default rule strategies for GAssist
Location:
branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3

    • Property svn:ignore set to
      Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs

    r9334 r9342  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.PluginInfrastructure;
    3132using HeuristicLab.Problems.DataAnalysis;
    3233
     
    6465    public IFixedValueParameter<DoubleValue> WeightRelaxFactorParameter {
    6566      get { return (IFixedValueParameter<DoubleValue>)Parameters["WeightRelaxFactor"]; }
     67    }
     68    public IFixedValueParameter<PercentValue> ActionMutationProbabilityParameter {
     69      get { return (IFixedValueParameter<PercentValue>)Parameters["ActionMutationProbability"]; }
    6670    }
    6771
     
    107111      Parameters.Add(new FixedValueParameter<DoubleValue>("InitialTheoryLengthRatio", "", new DoubleValue(0.075)));
    108112      Parameters.Add(new FixedValueParameter<DoubleValue>("WeightRelaxFactor", "", new DoubleValue(0.9)));
     113      Parameters.Add(new FixedValueParameter<PercentValue>("ActionMutationProbability", "", new PercentValue(0.1)));
    109114
    110115      Evaluator.SizePenaltyMinRulesParameter.ActualName = "SizePenaltyMinRules";
    111116      // do differently
    112117      ((MDLEvaluator)Evaluator).MDLCalculatorParameter.Value = new MDLCalculator(ActivationIterationParameter.Value.Value, InitialTheoryLengthRatioParameter.Value.Value, WeightRelaxFactorParameter.Value.Value);
     118      // do differently
     119      decisionListCreator.DefaultActionParameter.Value = problemData.FetchAction(0);
     120
     121      InitializeOperators();
     122    }
     123
     124    private void InitializeOperators() {
     125      foreach (var op in ApplicationManager.Manager.GetInstances<IDecisionListCrossover>())
     126        Operators.Add(op);
     127      foreach (var op in ApplicationManager.Manager.GetInstances<IDecisionListManipulator>())
     128        Operators.Add(op);
     129
     130      ParameterizeOperators();
     131    }
     132
     133    private void ParameterizeOperators() {
     134      foreach (IDecisionListCrossover op in Operators.OfType<IDecisionListCrossover>()) {
     135        op.ParentsParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
     136        op.ParentsParameter.Hidden = true;
     137        op.ChildParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
     138        op.ChildParameter.Hidden = true;
     139      }
     140      foreach (IDecisionListManipulator op in Operators.OfType<IDecisionListManipulator>()) {
     141        op.ChildParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
     142        op.ChildParameter.Hidden = true;
     143        op.ActionMutationProbabilityParameter.ActualName = ActionMutationProbabilityParameter.Name;
     144        op.ActionMutationProbabilityParameter.Hidden = true;
     145      }
    113146    }
    114147    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/HeuristicLab.Problems.DecisionListClassification-3.3.csproj

    r9334 r9342  
    115115  </ItemGroup>
    116116  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     117  <PropertyGroup>
     118    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     119set ProjectDir=$(ProjectDir)
     120set SolutionDir=$(SolutionDir)
     121set Outdir=$(Outdir)
     122
     123call PreBuildEvent.cmd
     124</PreBuildEvent>
     125  </PropertyGroup>
    117126  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    118127       Other similar extension points exist, see Microsoft.Common.targets.
Note: See TracChangeset for help on using the changeset viewer.