TEBSTSplitterΒΆ
Truncated E-BST.
Variation of E-BST that rounds the incoming feature values before passing them to the binary search tree (BST). By doing so, the attribute observer might reduce its processing time and memory usage since small variations in the input values will end up being mapped to the same BST node.
ParametersΒΆ
-
digits (int) β defaults to
1
The number of decimal places used to round the input feature values.
AttributesΒΆ
-
is_numeric
Determine whether or not the splitter works with numerical features.
-
is_target_class
Check on which kind of learning task the splitter is designed to work. If
True
, the splitter works with classification trees, otherwise it is designed for regression trees.
MethodsΒΆ
best_evaluated_split_suggestion
Get the best split suggestion given a criterion and the target's statistics.
Parameters
- criterion (river.tree.split_criterion.base.SplitCriterion)
- pre_split_dist (Union[List, Dict])
- att_idx (Hashable)
- binary_only (bool) β defaults to
True
Returns
BranchFactory: Suggestion of the best attribute split.
cond_proba
Not implemented in regression splitters.
Parameters
- att_val
- target_val (Union[bool, str, int])
remove_bad_splits
Remove bad splits.
Based on FIMT-DD's [^1] procedure to remove bad split candidates from the E-BST. This mechanism is triggered every time a split attempt fails. The rationale is to remove points whose split merit is much worse than the best candidate overall (for which the growth decision already failed). Let
Parameters
- criterion
- last_check_ratio (float)
- last_check_vr (float)
- last_check_e (float)
- pre_split_dist (Union[List, Dict])
update
Update statistics of this observer given an attribute value, its target value and the weight of the instance observed.
Parameters
- att_val
- target_val (Union[bool, str, int, numbers.Number])
- sample_weight (float)