Numeric attribute observer for classification tasks that is based on Gaussian estimators.
The distribution of each class is approximated using a Gaussian distribution. Hence, the probability density function can be easily calculated.
n_splits (int) – defaults to
The number of partitions to consider when querying for split candidates.
Determine whether or not the splitter works with numerical features.
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.
Get the best split suggestion given a criterion and the target's statistics.
- criterion (river.tree.split_criterion.base.SplitCriterion)
- pre_split_dist (Union[List, Dict])
- att_idx (Hashable)
- binary_only (bool)
BranchFactory: Suggestion of the best attribute split.
Get the probability for an attribute value given a class.
- target_val (Union[bool, str, int])
float: Probability for an attribute value given a class.
Update statistics of this observer given an attribute value, its target value and the weight of the instance observed.
- target_val (Union[bool, str, int, numbers.Number])
- sample_weight (float)