Ignore:
Timestamp:
11/16/11 13:58:19 (11 years ago)
Author:
mkommend
Message:

#1479:

  • Renamed symbolic classification sample.
  • Updated samples unit test to use new features of the SymbolicExpressionGrammar.
  • Updated symbolic regression and classification sample.
  • Filtered symbolic in AllowedChildSymbolsView.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs

    r6803 r6999  
    9696        for (int i = 0; i < Grammar.GetMaximumSubtreeCount(Symbol); i++) {
    9797          var node = new DummySymbol("Subtree " + i).CreateTreeNode();
     98          var groupSymbols = grammar.GetAllowedChildSymbols(Symbol, i).OfType<GroupSymbol>().ToList();
    9899          foreach (var childSymbol in Grammar.GetAllowedChildSymbols(Symbol, i)) {
    99             node.AddSubtree(new SymbolicExpressionTreeNode(childSymbol));
     100            if (!groupSymbols.Any(g => g != childSymbol && g.Flatten().Contains(childSymbol)))
     101              node.AddSubtree(new SymbolicExpressionTreeNode(childSymbol));
    100102          }
    101103          tree.Root.AddSubtree(node);
Note: See TracChangeset for help on using the changeset viewer.