Expand description
Tree kernels for structured data similarity
This module provides kernel functions for tree-structured data, particularly useful for measuring similarity between hierarchical expressions like TLExpr.
§Tree Representations
Trees are represented as labeled nodes with children, where each node has:
- A label (string identifier)
- A list of child nodes
§Kernel Types
- SubtreeKernel: Counts common subtrees between two trees
- SubsetTreeKernel: Counts common tree fragments (allows gaps)
- PartialTreeKernel: Partial subtree matching with decay factors
§References
- Collins & Duffy (2001): “Convolution Kernels for Natural Language”
- Moschitti (2006): “Making Tree Kernels Practical for Natural Language Learning”
Structs§
- Partial
Tree Kernel - Partial tree kernel - allows partial subtree matching
- Partial
Tree Kernel Config - Configuration for partial tree kernel
- Subset
Tree Kernel - Subset tree kernel - allows gaps in tree fragments
- Subset
Tree Kernel Config - Configuration for subset tree kernel
- Subtree
Kernel - Subtree kernel - counts common subtrees
- Subtree
Kernel Config - Configuration for subtree kernel
- Tree
Node - A tree node with label and children