architxt.simplification.tree_rewriting.operations.reductions#
Classes
|
Reduces the unlabelled nodes of a tree at the bottom-level. |
|
Base class for reduction operations. |
|
Reduces the unlabelled nodes of a tree at the top-level. |
- class architxt.simplification.tree_rewriting.operations.reductions.ReduceBottomOperation(*, tau, min_support, metric)[source]#
Bases:
ReduceOperation
Reduces the unlabelled nodes of a tree at the bottom-level.
This function identifies subtrees that do not have a specific type but contain children of type ENT. It then repositions these subtrees’ children directly under their parent nodes, effectively “flattening” the tree structure at this level.
- class architxt.simplification.tree_rewriting.operations.reductions.ReduceOperation(*, tau, min_support, metric)[source]#
-
Base class for reduction operations.
This class defines custom behavior for identifying subtrees to be reduced and applying the reduction operation.
- class architxt.simplification.tree_rewriting.operations.reductions.ReduceTopOperation(*, tau, min_support, metric)[source]#
Bases:
ReduceOperation
Reduces the unlabelled nodes of a tree at the top-level.
This function identifies subtrees that do not have a specific type but contain children of type ENT. It then repositions these subtrees’ children directly under their parent nodes, effectively “flattening” the tree structure at this level.