Changeset 9342 for branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs
- Timestamp:
- 04/05/13 13:12:54 (12 years ago)
- 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 1 1 *.user 2 Plugin.cs
-
- Property svn:ignore
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs
r9334 r9342 24 24 using System.Linq; 25 25 using System.Text; 26 using HeuristicLab.Algorithms.GAssist;27 26 using HeuristicLab.Common; 28 27 using HeuristicLab.Core; 28 using HeuristicLab.Optimization.Operators.LCS; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 … … 110 110 return new Rule(crossedVariables, action); 111 111 } 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 } 112 133 } 113 134 }
Note: See TracChangeset
for help on using the changeset viewer.