panobbgo.analyzers.splitter.Splitter#
- class panobbgo.analyzers.splitter.Splitter(strategy, split_rule=None, cut_rule=None, leaf_size=None, min_leaf_size=None, max_leaves=None, legacy=False, name=None)[source]#
Manages a tree of splits. Each split in this tree is a
box, which partitions the search space into smaller boxes and can have children. Boxes without children areleafs.The goal for this splitter is to balance between the depth level of splits and the number of points inside such a box.
A heuristic can build upon this hierarchy to investigate interesting subregions.
- Parameters:
strategy (StrategyBase) – the owning strategy.
split_rule –
"widest"(default, seeDEFAULT_SPLIT_RULE) or"value"; seeSPLIT_RULES.leaf_size – target mean number of results per leaf (default
LEAF_SIZE). The resolution of the tree ismax_eval / leaf_sizeleaves.min_leaf_size – floor on the split threshold, so a leaf is never cut before it holds enough points to say anything. Default
2 * dim + 2— the number of points a linear trend in dim variables needs, plus a margin.max_leaves – cap on the number of leaves (default
MAX_LEAVES); it raises the split threshold rather than refusing splits, so the partition stays a proper kd-tree.cut_rule –
"mean"(default, seeDEFAULT_CUT_RULE; measured in DISCOVERY §39) or"median"— where along the chosen dimension the cut falls.legacy –
Truerestores the pre-2026-09-10 analyzer exactly —limit = max(20, max_eval / dim**2),split_rule = "widest"andcut_rule = "mean". Every other knob is ignored. Kept so both trees are runnable from one code base and a measurement can be paired.strategy
name (str)
@type strategy: StrategyBase
- __init__(strategy, split_rule=None, cut_rule=None, leaf_size=None, min_leaf_size=None, max_leaves=None, legacy=False, name=None)[source]#
- Parameters:
strategy (StrategyBase)
name (str)
@type strategy: StrategyBase
Methods
__init__(strategy[, split_rule, cut_rule, ...])check_dependencies(analyzers, heuristics)This method is called by the core initialization to assess, if the dependencies for the given module are met.
get_box(point)return "leftmost" leaf box, where given point is contained in
get_leaf(result)returns the leaf box, where given result is currently sitting in
on_new_results(results)on_new_split(box, children, dim)Attributes
eventbusnameThe module's name.
problemresultsstrategy