PartialProximityTreeStump#

class PartialProximityTreeStump[source]#

Bases: object

Mixin of the proximity stumps for tabular data (PartialProximityTreeStumpClassifier): the PartialProximityTransformer built from the parameters of the stump and the rule.

get_rule(columns_names=None, scaler=None, float_precision: int | None = 3)[source]#

Rule of the split, e.g. euclidean(x, SP0(d: petal length=1.3)) <= euclidean(x, SP1(d: petal length=5.1)): the instances closer to the first partial pivot than to the second one go left.

Parameters:
  • columns_names (list of str, default=None) – Names of the features. If None, Feat. <index>.

  • scaler (TransformerMixin, default=None) – Scaler used to preprocess the data: the values of the pivots are shown in the original scale.

  • float_precision (int, default=3) – Not used: the values of the pivots are not rounded.

Returns:

rule – See RuleTreeBaseStump.get_rule.

Return type:

dict