ProximityPivotTreeStump#
- class ProximityPivotTreeStump[source]#
Bases:
objectMixin of the proximity pivot stumps (ProximityPivotTreeStumpClassifier and ObliqueProximityPivotTreeStumpClassifier): the ProximityPivotTransformer built from the parameters of the stump, the pivots of the split and its rule,
P_<a> <= P_<b>(closer to the training instanceathan tob).- get_pivots()[source]#
Pivots of the node, as indices of instances of the training set.
- Returns:
pivots –
descriptives,discriminativesandcandidatespivots of the node, and the two pivotsusedby the split.- Return type:
- get_rule(columns_names=None, scaler=None, float_precision=3)[source]#
Rule of the split,
P_<a> <= P_<b>: the instances closer to the training instanceathan tobgo left.- Parameters:
- Returns:
rule – See RuleTreeBaseStump.get_rule. Empty if the stump is not fitted.
- Return type:
- get_plot_rule(columns_names=None, scaler=None, float_precision=3)[source]#
What the node of the split shows in
RuleTree.plot_tree: the rule, and the two pivots as given to fit, drawn withshow_mediaon the arrows of the children: the first one on the left arrow (“true”, the instances closer to it), the second one on the right arrow.