Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/23/14 22:49:51 (10 years ago)
Author:
bburlacu
Message:

#2215: Fixed incorrect namespace of the BottomUpSimilarityCalculator. Changed signature of ComputeBottomMapping method to take tree nodes as arguments rather than trees, because we should be able to compute the bottom-up distance for any two subtrees. Added internal diversity calculator based on the bottom-up distance, which computes the average diversity of all the nodes inside a tree individual.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Tests/BottomUpSimilarityCalculatorTest.cs

    r11220 r11221  
    88using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    99using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
    10 using HeuristicLab.Problems.DataAnalysis.Symbolic.SimilarityCalculators;
    1110using HeuristicLab.Random;
    1211using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    3332      TestMatchedNodes("(+ 1 2)", "(+ 2 1)", 5);
    3433      TestMatchedNodes("(- 2 1)", "(- 1 2)", 2);
     34      TestMatchedNodes("(* (variable 1 X1) (variable 1 X2))", "(* (+ (variable 1 X1) 1) (+ (variable 1 X2) 1))", 2);
    3535
    3636      TestMatchedNodes("(* (variable 1 X1) (variable 1 X2))", "(* (+ (variable 1 X1) 1) (variable 1 X2))", 2);
     
    5252      var t2 = importer.Import(expr2);
    5353
    54       var mapping = busCalculator.ComputeBottomUpMapping(t1, t2);
     54      var mapping = busCalculator.ComputeBottomUpMapping(t1.Root, t2.Root);
    5555      var c = mapping.Count;
    5656
Note: See TracChangeset for help on using the changeset viewer.