Changeset 7488
- Timestamp:
- 02/20/12 13:03:15 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs
r7481 r7488 30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 32 33 32 [Item("SemanticSimilarityCrossover", "An operator which performs subtree swapping based on the semantic similarity between subtrees.")] 34 33 public sealed class SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { … … 53 52 : base() { 54 53 Parameters.Add(new ValueLookupParameter<DoubleRange>(SemanticSimilarityRangeParameterName, "Semantic similarity interval.", new DoubleRange(0.0001, 10))); 55 Name = "SemanticSimilarityCrossover";56 54 } 57 public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<T>(this, cloner); } 55 public override IDeepCloneable Clone(Cloner cloner) { 56 return new SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<T>(this, cloner); 57 } 58 58 59 59 public override ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) { … … 109 109 double ssd = OnlineMeanAbsoluteErrorCalculator.Calculate(estimatedValues0, estimatedValues1, out errorState); 110 110 111 if (range.Start > ssd || range.End < ssd) 112 continue; 113 114 selectedBranch = node; 115 break; 111 if (range.Start <= ssd && ssd <= range.End) { 112 selectedBranch = node; 113 break; 114 } 116 115 } 117 116
Note: See TracChangeset
for help on using the changeset viewer.