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.Encodings.DecisionList/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3

    • Property svn:ignore
      •  

        old new  
        11*.user
         2Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs

    r9334 r9342  
    2424using System.Linq;
    2525using System.Text;
    26 using HeuristicLab.Algorithms.GAssist;
    2726using HeuristicLab.Common;
    2827using HeuristicLab.Core;
     28using HeuristicLab.Optimization.Operators.LCS;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
     
    110110      return new Rule(crossedVariables, action);
    111111    }
     112
     113    public void ApplySplit(IRandom random, double probability) {
     114      foreach (var variable in variables.Values) {
     115        if (random.NextDouble() < probability)
     116          variable.Split(random);
     117      }
     118    }
     119
     120    public void ApplyMerge(IRandom random, double probability) {
     121      foreach (var variable in variables.Values) {
     122        if (random.NextDouble() < probability)
     123          variable.Merge(random);
     124      }
     125    }
     126
     127    public void ApplyReinitialize(IRandom random, double probability, double oneProbability, IEnumerable<IDiscretizer> discretizers) {
     128      foreach (var variable in variables.Values) {
     129        if (random.NextDouble() < probability)
     130          variable.Reinitialize(random, oneProbability, discretizers);
     131      }
     132    }
    112133  }
    113134}
Note: See TracChangeset for help on using the changeset viewer.