Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/11/13 13:32:32 (12 years ago)
Author:
sforsten
Message:

#1980:

  • set plugin dependencies
  • added smart initialization
  • added hierarchical selection
  • fixed major and minor default rule
  • fixed several smaller bugs
  • some refactoring has been done
Location:
branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3
Files:
4 edited

Legend:

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

    r9411 r9605  
    4444
    4545    #region parameter properties
    46     public IFixedValueParameter<BoolValue> MaximizationParameter {
    47       get { return (IFixedValueParameter<BoolValue>)Parameters["Maximization"]; }
     46    public FixedValueParameter<BoolValue> MaximizationParameter {
     47      get { return (FixedValueParameter<BoolValue>)Parameters["Maximization"]; }
    4848    }
    4949    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
     
    8585    }
    8686
    87     IStrataSingleObjectiveEvaluator IGAssistProblem.Evaluator {
     87    IGAssistObjectiveEvaluator IGAssistProblem.Evaluator {
    8888      get { return Evaluator; }
    8989    }
     
    108108      : this(new DecisionListClassificationProblemData(new Dataset(DecisionListClassificationProblemData.defaultVariableNames, DecisionListClassificationProblemData.defaultData),
    109109        DecisionListClassificationProblemData.defaultVariableNames.Take(DecisionListClassificationProblemData.defaultVariableNames.Length - 1), DecisionListClassificationProblemData.defaultVariableNames.Last()),
    110         new MDLEvaluator(), new UniformRandomDecisionListCreator()) { }
     110        new MDLEvaluator(), new SmartDecisionListCreator()) { }
    111111
    112112    public DecisionListClassificationProblem(IDecisionListClassificationProblemData problemData, IDecisionListEvaluator decisionlistEvaluator, IDecisionListCreator decisionListCreator)
     
    118118      Parameters.Add(new FixedValueParameter<PercentValue>("ActionMutationProbability", "", new PercentValue(0.1)));
    119119
     120      MaximizationParameter.Value.Value = Evaluator.MaximizationParameter.Value.Value;
     121      Evaluator.MaximizationParameter.Value.ValueChanged += MaximizationParameter_ValueChanged;
    120122      Evaluator.SizePenaltyMinRulesParameter.ActualName = "SizePenaltyMinRules";
    121123
    122124      InitializeOperators();
     125    }
     126
     127    private void MaximizationParameter_ValueChanged(object sender, System.EventArgs e) {
     128      MaximizationParameter.Value.Value = Evaluator.MaximizationParameter.Value.Value;
    123129    }
    124130
     
    143149
    144150    private void ParameterizeOperators() {
    145       var autoDefaultRule = Operators.Where(x => x is AutoDefaultRule).Select(x => x as AutoDefaultRule).First();
     151      var autoDefaultRule = Operators.OfType<AutoDefaultRule>().First();
    146152      autoDefaultRule.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    147153      autoDefaultRule.GAssistNichesProblemDataParameter.ActualName = ProblemDataParameter.Name;
     
    149155      foreach (IDefaultRuleOperator op in Operators.OfType<IDefaultRuleOperator>()) {
    150156        op.IndividualParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
    151         op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
    152157        op.GAssistNichesProblemDataParameter.ActualName = ProblemDataParameter.Name;
    153158        op.GAssistNichesProblemDataParameter.Hidden = true;
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs

    r9470 r9605  
    4444      {0,1,1,1,0,0,0},
    4545      {0,0,1,0,0,0,1},
     46      {1,0,1,0,1,1,0},
     47      {0,0,1,1,0,0,0},
     48      {0,1,1,1,0,0,0},
     49      {0,0,1,0,0,0,1},
    4650      {1,0,1,0,1,1,0}
    4751    };
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/HeuristicLab.Problems.DecisionListClassification-3.3.csproj

    r9352 r9605  
    9595  </ItemGroup>
    9696  <ItemGroup>
    97     <ProjectReference Include="..\..\HeuristicLab.Algorithms.GAssist\3.3\HeuristicLab.Algorithms.GAssist-3.3.csproj">
    98       <Project>{f191a6fa-1b3c-4f82-a711-873b4d839bc0}</Project>
    99       <Name>HeuristicLab.Algorithms.GAssist-3.3</Name>
    100     </ProjectReference>
    10197    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    10298      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/Plugin.cs.frame

    r9334 r9605  
    2525  [Plugin("HeuristicLab.Problems.DecisionListClassification", "3.3.7.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Problems.DecisionListClassification-3.3.dll", PluginFileType.Assembly)]
     27  [PluginDependency("HeuristicLab.Collections", "3.3")]
     28  [PluginDependency("HeuristicLab.Common", "3.3")]
    2729  [PluginDependency("HeuristicLab.Core", "3.3")]
     30  [PluginDependency("HeuristicLab.Data", "3.3")]
     31  [PluginDependency("HeuristicLab.Encodings.DecisionList", "3.3")]
     32  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     33  [PluginDependency("HeuristicLab.Optimization.Operators.LCS", "3.3")]
     34  [PluginDependency("HeuristicLab.Parameters", "3.3")]
     35  [PluginDependency("HeuristicLab.Persistence", "3.3")]
     36  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
     37  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    2838  public class HeuristicLabProblemsDecisionListClassificationPlugin : PluginBase {
    2939  }
Note: See TracChangeset for help on using the changeset viewer.