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 are leafs.

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, see DEFAULT_SPLIT_RULE) or "value"; see SPLIT_RULES.

  • leaf_size – target mean number of results per leaf (default LEAF_SIZE). The resolution of the tree is max_eval / leaf_size leaves.

  • 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, see DEFAULT_CUT_RULE; measured in DISCOVERY §39) or "median" — where along the chosen dimension the cut falls.

  • legacy – True restores the pre-2026-09-10 analyzer exactly — limit = max(20, max_eval / dim**2), split_rule = "widest" and cut_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:

@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

eventbus

name

The module's name.

problem

results

strategy