architxt.simplification.tree_rewriting.operations.operation#
Classes
|
Abstract base class representing a tree rewriting operation. |
- class architxt.simplification.tree_rewriting.operations.operation.Operation(*, tau, min_support, metric)[source]#
Bases:
ABCAbstract base class representing a tree rewriting operation.
This class encapsulates the definition of operations that can be applied to a tree structure using certain equivalence subtrees, a threshold value, a minimum support value, and a metric function. It acts as the base class for any concrete operation and enforces the structure through abstract methods.
- Parameters:
tau (
float) – Threshold for subtree similarity when clustering.min_support (
int) – The minimum support value for a structure to be considered frequent.metric (
Callable[Collection[str],Collection[str],float]) – The metric function to use for computing the similarity between subtrees.